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

[23] Highlight 'module' in module imports #1589

Closed
stephan-herrmann opened this issue Aug 14, 2024 · 1 comment
Closed

[23] Highlight 'module' in module imports #1589

stephan-herrmann opened this issue Aug 14, 2024 · 1 comment
Assignees
Milestone

Comments

@stephan-herrmann
Copy link
Contributor

The syntax from eclipse-jdt/eclipse.jdt.core#2383 needs to get some help for highlighting the conditional keyword / restricted identifier module in code like this:

package foo;
import module java.xml;
public class Foo {
    Document doc;
}
@stephan-herrmann stephan-herrmann added this to the BETA_JAVA23 milestone Aug 14, 2024
@stephan-herrmann stephan-herrmann changed the title Highlight 'module' in module imports [23] Highlight 'module' in module imports Aug 14, 2024
@stephan-herrmann stephan-herrmann self-assigned this Aug 17, 2024
@stephan-herrmann
Copy link
Contributor Author

Sneak preview of local implementation based on eclipse-jdt/eclipse.jdt.core#2836:
image

I changed the color for restricted identifiers for clarity (see how record is rendered).

This is the code we are referring to:

  • module-info.java:
    image
  • con/Fusion.java:
    image

See that the import declaration can distinguish between occurrences of the word "module" (modifier vs. identifier), which the editor of module-info.java cannot yet.

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