Is there any way to prevent "Organize imports" from changing the child class to the parent class? #3692
Unanswered
akarampetsos
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I came across this issue when developing with LWJGL, where each OpenGL version is a class with all static methods and each newer version extends the previous one.
A simplified example is this.
Ideally I would like to use
Child.someMethodas import. Well, actuallyGL46C.someOpenGLmethodinstead ofGLXX(the specific version of OpenGL where the method was introduced.The motivation is to wildcard import statically all the members of an OpenGL version. So, If I want to target OpenGL 3.3 core then I can just
import static org.lwjgl.opengl.GL33C.*;. The methods already have theglprefix, so there is also no issue of name collisions.Beta Was this translation helpful? Give feedback.
All reactions