Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
TDMWeb Kylix Developer's Guide
 JBuilder 3 - New Features in the Source Editor
See Also: JBuilder Papers

We spent a lot of time in the source editor of JBuilder. And in JBuilder 3 we got some new fancy and useful features, which make life a bit more easy. In this article we will look at the extra features added in JBuilder 3.

For starters: the popup menus of the CodeInsight feature have been changed. We can now see icons and different font styles in the list. The following figure shows an example (the list shows up after we typed the dot or if we press Ctrl-Space):

The new and improved CodeInsight popup menu

The first thing we notice are the icons, because JBuilder 2 didn't show any icons. These icons represent the types of methods and members available. The structure pane uses the same icons as seen in this list. For example the icon void method icon represents a method with return type void.
Another thing is the style of the fonts used. Any method or member found in the class we are working in is bold, other methods or members are displayed in plain style. So the methods and members of classes we extend from are not displayed in the bold font style, but in the plain font style.


When we select a item from the popup menu the name of the selected item will be shown in the editor. But now in JBuilder 3 also the parenthesis are inserted automatically in the source code. And if the method has arguments then these arguments are shown immediately, and the text cursor is already at the right spot.

Method with arguments
Using CodeInsight for method with not a void return type


If the method has a void return type then JBuilder 3 will also automatically insert the closing semi-colon at the end of the line. If the return type isn't void JBuilder wouldn't know if we wanted to end the line or not, but with a void return type, JBuilder is sure it is the last statement of the line:

Void method with arguments
Using CodeInsight for method with a void return type

It takes a bit of getting used to these features, because especially in the beginning we will type the parenthesis ourselves and then we have got two many parenthesis in the source code. And if Borland keeps it up, we maybe in JBuilder 4 don't have to type at all!

The code completion for the import statement has also changed. In JBuilder 2 we did get a tree view of all available packages we could use for the import statement. But now in JBuilder 3 we only see parts of the package names, which are in scope. The following figure shows all available package names which start with com.borland.:

Code completion with import statement

Right-clicking in the editor window results in the following popup menu:

Popup menu of source editor


Besides the new icons we see a new menu option: Read Only. With this option we can change the read-only property of the source file we are working on.


This webpage © 1997-2009 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.