JBuilder 2006: auto generating import statements/getting help on needed import statements

JBuilder 2006: auto generating import statements/getting help on needed import statements

Post by Deedee Te » Sat, 23 Dec 2006 00:24:10


I am evaluating JBuilder 2006 and I am rather new to Java, so I may be
missing the obvious. Any help appreciated.

I wish for an easy way to get help from within JBuilder 2006 when I
need to write an import statement for a class. Say that I declare an
instance of JPanel and that I do not already have a line saying:

import javax.swing.JPanel;

If I place the caret on the JPanel class name in my declaration and
press F1, all I get is some generic help on the IDE, not what I
really need (which is information on the methods and members of
JPanel, and on which package I must import). Only after I add the
appropriate import statement I can access the context help on JPanel.
I suspect that this is because, in theory, there may be other classes
called JPanel somewhere in more than one package, but at least I would
like to have some quick help on which package(s) within the Java path
contain a JPanel class definition, instead of having to leaf through
the Java API reference on my desk.
 
 
 

JBuilder 2006: auto generating import statements/getting help on needed import statements

Post by Bill Jo » Sat, 23 Dec 2006 00:44:30

ErrorInsight has options "Find with ClassInsight" and "Suggest Class
Reference".

Add a line to one of your methods such as

new JPanel();

And you will see an icon in the left gutter of the Editor. Either click on
it or do Alt+Enter and choose either menu option which will help you add the
needed import.

You can always use Search | Find Classes to just find/open any class.

 
 
 

JBuilder 2006: auto generating import statements/getting help on needed import statements

Post by Deedee Te » Sat, 23 Dec 2006 17:50:50

Thanks, this is exactly what I was looking for. Probably I missed it
before because there can be different incons in the gutter, and
clicking on the exclamation mark icon does nothing. The exclamation
mark + key icon, as you suggested, brings up ErrorInsight.

I am having second thoughts about JBuilder because it essentially has
been abandoned by its developers. Since JBuilder 2007 is basically
Eclipse, then maybe I should look at Eclipse instead of learning an
IDE without a future. Sun Java Studio is another free alternative.

On Thu, 21 Dec 2006 07:44:30 -0800, "Bill Joy" < XXXX@XXXXX.COM >
 
 
 

JBuilder 2006: auto generating import statements/getting help on needed import statements

Post by Gillmer J. » Sat, 23 Dec 2006 22:57:16


Um, the response you got to your question was from one of the
developers, so he might disagree with you on that.

--
Gillmer J. Derge [TeamB]