I have the exact same function `glBufferData` in t...
# announcements
e
I have the exact same function
glBufferData
in two different locations
import org.lwjgl.opengl.GL15.*
import gln.buffer.glBufferData
is there a way to avoid importing it from the first
import
? At the moment I'm having this in addition:
import org.lwjgl.opengl.GL15.glBufferData as deprecated
but it's meh..
a
Why do you want to use the second import? Is the first import not enough?
e
because it's different under the hood
a
https://kotlinlang.org/docs/reference/packages.html says that only
import foo.Bar
or
import foo.*
is possible, there is no way to exclude a specific function from
import foo.*
. Instead of
import foo.*
, you can import only the specific things you need
but if the list of things imported gets above the threshold, intellij will automatically replace the imports with
*
e
problem is that I'm using also other methods from that import, and the automatic import cleaning always optimize it like that
exactly
c
surround it with
//@formatter:off
//@formatter:on
e
?
@Czar What you mean?
c
Import the methods you want, without importing the one you don't, surround these imports with the comments I posted, intellij shouldn't reformat it into`.*` (oh, and make sure you have enabled the formatter comments in IJ settings, I don't exactly remember where and don't have IJ easily available atm).
e
an interesting fact, if I have both import
import org.lwjgl.opengl.GL15.*
import gln.buffer.glBufferData
then if I type
glBufferData
it will reference the second import