This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hi, is there anyway, where when i add a CLASS TYPE eclipse automatically loads the class in the import statement ie. suppose i added (ResultSet set = stmt.executeQuery()), i want Eclipse to add ResultSet class automatically in the import statement. I tried to add missing import statement by going to source > add import but it didnt do anything, do i have to setup anything before i can use this property.
suppose i added (ResultSet set = stmt.executeQuery()), i want Eclipse to add ResultSet class automatically in the import statement.
When you write ResultSet, instead write java.sql.ResultSet, I mean, when you type . after java, you should see a popup from where you can select another interface or class, here you will select sql and then type . and again you should see another popup to select ResultSet. After this last selection, you should see ResultSet import statement and ResultSet without its qualified name.
If I remember correctly, "add import" only adds an import for the class your text cursor is positioned in. To add imports for all classes in the current editor, use "organize imports" (ctrl-shift-o).
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus