Skip to content
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

Import names starting with two or more uppercase characters are highlighted as constants #66

Open
JorelAli opened this issue Apr 29, 2022 · 0 comments

Comments

@JorelAli
Copy link

Java class names which start with two capital letters inside an import statement are colored as constants:

import java.io.File;         // File is colored normally
import java.io.IOException;  // IOException is in blue
import java.util.UUID;       // UUID is in blue

public class MyClass {

  // Code here

}

This is likely caused by this snippet from Java.plist

<dict>
    <key>captures</key>
    <dict>
        <key>1</key>
        <dict>
            <key>name</key>
            <string>keyword.operator.dereference.java</string>
        </dict>
    </dict>
    <key>match</key>
    <string>(\.)?\b([A-Z][A-Z0-9_]+)(?!&lt;|\.class|\s*\w+\s*=)\b</string>
    <key>name</key>
    <string>constant.other.java</string>
</dict>
@JorelAli JorelAli changed the title Import names with two or more uppercase characters are highlighted as constants Import names starting with two or more uppercase characters are highlighted as constants Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant