-
Notifications
You must be signed in to change notification settings - Fork 228
Show ZWSP (zero with space) as code mining #1437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
...r/src/org/eclipse/ui/internal/texteditor/codemining/ZeroWidthSpaceLineContentCodeMining.java
Outdated
Show resolved
Hide resolved
|
|
||
| public class ZeroWidthSpaceLineContentCodeMiningProvider extends AbstractCodeMiningProvider { | ||
|
|
||
| private static final char ZWSP_SIGN = '\u200b'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also add
\u200c zero width non-joiner
\u200d zero width joiner
\ufeff zero width no break space
See: https://plugins.jetbrains.com/plugin/7448-zero-width-characters-locator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated this PR.
It works now with all above zero width characters.
Please check it.
Please also check the new preferences:

-
Do we need to distinguish between line begin, end and enclosing for ZWSP? IMHO not, just makes core more complex. But "enclosing" may not fit as a term then.
-
Do we show ZWSP as code mining or something else? Because it is not just space.
b082ac8 to
6cccc08
Compare
BeckerWdf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments above
I tried to ignore and overwrite the color with the one TextEditor uses for drawing spaces, tabs,... Line 447 in 2c5b605
SWT.COLOR_LIST_FOREGROUND, which is black.I even debugged the drawing of a tab and it was colored 0, 0, 0 but appeared grey. I dont get it.... |
0ee781a to
8b2948b
Compare
|
I just played around a bit with the current state. |
Thanks. That looks good now. |
This is now also fixed. Thanks, |
Issue: eclipse-platform#1002 For more information refer to https://www.compart.com/en/unicode/U+200B To get a ZWSP refer to https://zerowidthspace.me/
Is the color of "ZWSP" grey or black in your case? |
I also just debugged this. And I see that the color (for the whitespace chars comes from the styleRange not the textWidget: Line 449 in 2c5b605
|
black. |







Issue: #1002
For more information refer to https://www.compart.com/en/unicode/U+200B To get a ZWSP refer to https://zerowidthspace.me/