-
Notifications
You must be signed in to change notification settings - Fork 466
Semantic highlighting sometimes looks bad #1396
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
Comments
Signed-off-by: Fred Bricon <[email protected]>
Isn't this a specific color theme bug? I'm using this beautiful theme and the semantic highlight for fields inside methods are working as expected: Before semantic token it was not possible to set the fields color inside a method. Only fields with |
The bug is caused by caclulating semantic tokens of wrong AST nodes. And it should be fixed by eclipse-jdtls/eclipse.jdt.ls#1412 and eclipse-jdtls/eclipse.jdt.ls#1418 . Below are steps to stably reproduce it.
A.java public class A {
String aString = "";
} B.java public class B {
final static int constantInteger = 1;
} |
Fixed in 0.61.0 |
@JoeyRxy Can you figure out a way to stably reproduce it? That would be a great help for us to understand the cause and provide a fix. |
I think this problem occurs randomly. When you open a java file in a project (maven project most time in my situation), sometimes this problem occurs after you edit something. in the pictures above, I just input an |
@Eskibear I'm pretty sure this is related to #1597, and I don't think it's caused by any of my changes since I've seen it happen occasionally before, in version 0.64 or earlier. I've tried to reproduce it, but it was hard to find any consistent way to do it. See my comment for what I've been able to find out so far. I'll try to find some steps to reproduce it if I have time next week. |
When "java.semanticHighlighting.enabled": true, even without any particular token settings, this causes bad highlighting of existing code using static imports:

When enabled:
When disabled:

The text was updated successfully, but these errors were encountered: