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
-
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.someMethod
as import. Well, actuallyGL46C.someOpenGLmethod
instead 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 thegl
prefix, so there is also no issue of name collisions.Beta Was this translation helpful? Give feedback.
All reactions