How Does One Simply Forget An Import

I was checking out the SpongeAPI repository when I found a commit with the comment:

“Congratulations, you forgot to import so this doesn’t compile.”

Which made me think:

Flips backwards out of chair
“How the **** does one forget to import something with an IDE”

Maybe Eclipse is just superior to IntelliJ in detecting missing imports and such. If I forget an import or something, literally every reference to the field that uses that import is highlighted red, and Eclipse is even nice enough to add the import for you at the press of a button. But I haven’t touched IntelliJ so I would not know how it compares. So with that said… Any reasons?

Started playing with NetBeans a while back, and I really missed the crtl+shift+O functionality to fix and add missing imports automagically. Not sure how IntelliJ goes about it, but NetBeans was a pain to setup with the same shortcut.

on another sidenote, the space+enter to see the possible autofill code always gets messed up with the OS IME switcher thingydoodler, and I had to turn that off in Xubuntu so it’d work properly, too.

1 Like

IntelliJ does auto-imports too. So no need to bash on IntelliJ (as I am a user of intellij and do not want this to get into a debate I shall leave it at that). I think its mainly for the people who don’t know how to use their IDE’s.

1 Like

where in the settings is it? I just took a poke at it and can’t find it… :confused: Help a brother out? <3

You use Notepad to code ^^. That’s how.


You must be an experienced coder @TBotV63 teach me notepad++ java coding?


Sure. You exit the program and slam your face on the desk.


FaceDesk Ok, now what?


You go and look for an actual IDE.


ok, I choose Notepad++ 2


Back to step one…

1 Like

Simple: Look at the pull request: Add Game#getDirectory() by jamierocks · Pull Request #438 · SpongePowered/SpongeAPI · GitHub

The branch the person created is named “patch-1”.
The github web editor automatically creates this branch when you hit the “Edit file” button.

The person didn’t use an IDE :wink:

I dont use an IDE when doing really small changes i am just too lazy sometimes to back, commit and push.

I use IntelliJ, but I honestly think that Eclipse is a smarter IDE. I’ve used both.

1 Like

ok, done, now what?

pls, i use wordpad like a true professional

its not /that/ unlikely
i mean i’ve unreasonably forgotten to import things in my code before and wasted 17 hours trying to figure out the problem before realizing it was just a missing import or a wrong import

Although I have been using nano/gedit more than notepad++ lately (Yes I’m using gnome on ubuntu server, shame me now)


Huh, didn’t know this. I saw “IntelliJ” mentioned later down the comments so it added up to “missing an import whilst using an IDE”.


You’d have to have disabled the inspection or something.

Eclipse is bæ.