eclipse-jdt / eclipse.jdt.core

Eclipse Public License 2.0
157 stars 124 forks source link

[23] DOM support for JEP 476: Module Import Declarations (Preview) #2836

Closed stephan-herrmann closed 3 weeks ago

stephan-herrmann commented 3 weeks ago

fixes https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2834

stephan-herrmann commented 3 weeks ago

@jarthana while this already produces desired results (and passes even JDT/UI tests), I'm a short in additional tests. From the experience of previous AST additions, can you recommend which test would be good to extend here?

stephan-herrmann commented 3 weeks ago

Documenting one oddity:

To cleanly separate strategies before vs since JLS23 I had to let JLS23-mode represent all modifiers using list modifiers().

For code manipulation those synthesized Modifiers work fine, we just need to be sure, that setStatic(boolean) is never called in a situation where valid source positions are needed (I made a corresponding note in the method's javadoc).

stephan-herrmann commented 3 weeks ago

@jarthana while this already produces desired results (and passes even JDT/UI tests), I'm a short in additional tests. From the experience of previous AST additions, can you recommend which test would be good to extend here?

I'm still open to suggestions :)