Quick Tips
Tips vary by JBuilder edition. If an edition is not specified, the tip is available for all editions. The edition is specified by the following:
E: JBuilder Enterprise
P: JBuilder Professional
Note: These tips can also be viewed as Tip of the Day. To open Tip of the Day, select Help|Tip Of The Day. To turn Tip of the Day off, uncheck the Show Tip Of The Day After Launching option and access it from the Help menu.
- Applets using Swing components
Most browsers do not support Swing components and other new JDK features. For best results, write your applet using the same JDK that the browser uses and use AWT components instead of Swing.
- Use Sun's Java Plug-in for applets
If you're writing your applets with the newer JDKs which most browsers do not support, use Sun's Java Plug-in.
- Different ways to run your applet
Right-click the applet HTML file in the project pane to run your applet in Sun's appletviewer. Select Run|Run Project to run your applet in JBuilder's applet viewer, AppletTestbed.
- Running applets with JDK 1.1 and JDK 1.2/1.3
Read "Working with applets" in the Web Application Developer's Guide for tips on running JDK 1.1.x and 1.2/1.3 applets in JBuilder. In JBuilder Personal, this chapter is in Building Applications with JBuilder.
- Debugging applets in the Java Plug-in
You can debug applets from within Internet Explorer 5 or Netscape Navigator 4.72 using the Java Plug-in and JBuilder's debugger. See "Working with applets" in the Web Application Developer's Guide. E
- Make your code comments
Use Ctrl+/ as a line comment toggle. Ctrl+/ adds comment tags (//) to the line of code the cursor is on or removes existing comment tags.
Highlight blocks of code and use Ctrl+/ to comment or remove existing comments on an entire block.
- Shortcut keyboard commands
Using keyboard commands can increase your productivity. For a complete list of keyboard commands, see Help|Keyboard Mappings or open the Keymap Editor (Tools|Editor Options|Customize).
- Code templates match your coding style
JBuilder's pre-defined code templates are formatted according to your project preferences. These options are set in the following locations:
- Braces: Project|Project Properties|Code Style page
- Block Indent: Tools|Editor Options|Editor page
Note: When you create or modify templates in JBuilder Professional and Enterprise, JBuilder does not format it according to the preferences. You must manually set the braces and indents.
- Code templates
Code templates have a full set of anonymous listeners and adapters available, which makes it easy to add anonymous classes as listeners. Ctrl+J in the editor brings up the list of templates.
- Pre-defined code templates
Use JBuilder's pre-defined code templates to quickly insert code. Ctrl+J in the editor brings up the list of templates. Select a template and press Enter to insert it in the editor. To view the code for the templates, choose Tools|Editor Options|Templates. These templates are read-only in JBuilder Personal. You can add and edit templates in JBuilder Professional and Enterprise.
- Quick coding with code templates
Use code templates to create @todo
tags and other code blocks. Press Ctrl+J in the editor to access the list of templates or choose the Templates page in the Editor Options dialog box (Tools|Editor Options).
- Put MemberInsight to work
When editing source code, pressing Ctrl+Space brings up a list of classes, variables, and packages. MemberInsight also provides auto-completion whenever possible: try typing ArrayI
in a method and press Ctrl+Space to see what happens.
- Put ParameterInsight to work
If the cursor is between the parentheses for a method call, pressing Ctrl+Shift+H or Ctrl+Shift+Space brings up a list of valid parameters.
- Use CodeInsight on existing code
Use CodeInsight to find out about members or parameters without changing any code! For example, if you have System.out.println("");
in your code, position your cursor after the period of "out." Press Ctrl+Space to get the members of out
or position the cursor after the opening parenthesis of println("")
and press Ctrl+Shift+H to get the list of parameters.
- CodeInsight and variable names
If you need help with long variable names, type in the first few characters of the name and press Ctrl+Space. Your variable name is easy to find in the CodeInsight pop-up window.
- CodeInsight tips
When using CodeInsight, you can accept the currently highlighted selection in the CodeInsight pop-up window with the period (.) character. The selected name is automatically entered in the editor followed by a period. CodeInsight appears again for the next selection. This is useful for completing variable names with multiple embedded periods such as System.out.println
.
- Modify the CodeInsight keys
CodeInsight keymaps are modifiable in the Keymap Editor. Choose Tools|Editor Options. Choose the Editor tab, click the Customize button next to the editor keymap, and look for CodeInsight in the Keymap Editor. P E
- Automatically add classes to your code with ClassInsight
Use ClassInsight to quickly add a class to your source code. Press Ctrl+Alt+Space or Ctrl+Alt+H in the editor and begin typing the class name in the Search For field. A list of possible matches is built incrementally as you type. Choose a class, press Enter, and the class name is added to your code. An import statement is automatically added to the import section of your code. ClassInsight has options that control how the class name and import statement are added, such as short or fully qualified class name. P E
- CodeInsight helps you with the Show Error Messages option
Choose the Show Error Messages option on the CodeInsight page of the Editor Options dialog box (Tools|Editor Options) to get extra help from CodeInsight. When this option is selected, if MemberInsight or ParameterInsight pop-up windows can't be displayed due to compiler errors, CodeInsight expands the error node in the structure pane to display the errors. Also, if there is additional information, the main status bar shows a short message, such as "Unable to determine type of expression."
- Put CodeInsight to work for you
Use these timesaving CodeInsight features:
- Ctrl+H invokes MemberInsight (Brings up a context-sensitive list of available classes and methods for the current context).
- Ctrl+Space automatically completes class and method names as you type. Set the Autocomplete While Typing option on the CodeInsight page of the Editor Options dialog box (Tools|Editor Options).
- Ctrl+Shift+H or Ctrl+Shift+Space invokes ParameterInsight when inside the parentheses of a method (Gives parameters expected for the method being coded).
- Ctrl+Enter invokes Find Definition ("Drills down" and opens the source of the symbol the caret is over in the content pane).
- Ctrl+Alt+Space or Ctrl+Alt+H invokes ClassInsight, where you search and add classes. When you add a class using ClassInsight, the import statement is automatically added to your code.
Note: For the Macintosh, use the Command key instead of Ctrl.
Important: Keyboard commands vary by keymapping. For a list of keyboard commands, see Help|Keyboard Mappings.
- Rebuild portions of your project
Selectively rebuild portions of your project by highlighting one or more packages or classes in the project pane. Then choose Make or Rebuild from the right-click menu.
- Setting the main class
Set the main class for your project on the Run page of Project Properties (Project|Project Properties).
- The Run command
Choosing Run|Run Project or the Run button runs the main class set on the Run page of Project Properties (Project|Project Properties).
- Run and debug configurations
Save time by creating custom run and debug configurations. Choose Run|Configurations, add your configurations, then select them from the drop-down arrows next to the Run and Debug buttons on the main toolbar. P E
- Easy way to find import from compiler error
When the compiler can't resolve an import it generates an error. Double-click the error message to open the file in the content pane with the cursor at the class name it can't resolve. Press Ctrl+Alt+Space or Ctrl+Alt+H for ClassInsight and a list of all possible classes is displayed. Pick the correct one and the import is automatically added. P E
- Enable the assert keyword
Enable JDK 1.4-style assertions by choosing the Enable Assert Keyword option on the General page of Project Properties (Project|Project Properties).
- Accessing ExpressionInsight
Ctrl+right-click an expression to access ExpressionInsight while debugging. If the expression is an object, you will see the object with all its children, which are also expandable. If you hold down the Ctrl key and move your mouse around, ExpressionInsight will come up for anything that is a meaningful expression under the mouse. The window disappears when the mouse is clicked outside it, or if no actions are taken inside of it (similar to CodeInsight). P E
- Automatically go to the head of the debugging class
Use the Show Current Frame button while debugging to automatically take you to the class you are debugging.
- Debug information
Control your debug information. Choose from these debug options on the Build page of Project Properties (Project|Project Properties):
- Source, Line, and Variable Information
- Source And Line Only
- Source Only
- None
In JBuilder Personal, only two options are available: Source, Line, and Variable Information and Source And Line Only.
- Run and debug configurations
Save time by creating custom run and debug configurations. Choose Run|Configurations, add your configurations, then select them from the drop-down arrows next to the Run and Debug buttons on the main toolbar. P E
- Deploy with the Archive Builder
Quickly deploy your application with the Archive Builder. Choose Wizards|Archive Builder. Once you've created an archive, an archive node displays in the project pane. Right-click the node and choose Make to generate the archive. Choose Properties to modify the archive. P E
- Define your resources for deployment
Define file types as resources, as well as individual files. P E
- File types: choose Project|Project Properties and choose the Resource tab on the Build page. Select the file types and the option to copy or not copy to the output path for deployment.
- Individual files: select a file or files in the project pane, right-click, and choose Properties. On the Resource tab of the Build page, choose whether to copy or not copy these files to the output path for deployment.
- Create source and documentation archives
Archive your source files and documentation files with the Archive Builder. Choose Wizards|Archive Builder and select the appropriate archive type. P E
- Getting help on properties
For help on property editors in the designer, click the ellipsis button to the right of the property value in the Inspector, if available, and click Help in the dialog box.
- Viewing Javadoc for components
When using a JBuilder designer, select a component in the component tree and choose F1 to view Javadoc for its ancestor class.
- Cursor locations in the designer
When dropping a component in the designer, the main status bar displays the cursor location and the name of the component.
- Designing with layouts
Design your UI in null
or XYLayout
using nested panels to group components. Convert panels to final layouts after you've finished assembling the components. XYLayout
is a feature of JBuilder Professional and Enterprise. For a tutorial on UI design, see "Creating a UI with nested layouts" in Designing User Interfaces.
- Default layout properties
You cannot edit the layout
properties for a <default layout>. You must specify an explicit layout manager for its properties to be accessible in the Inspector.
- Renaming components
Right-click a component in the component tree and choose Rename to change a component's name.
- Adding events to components
Double-click a component in the UI designer to create a default event. JBuilder generates the code and switches to the editor with the cursor positioned inside the event. Add the desired action to the event. For other events and for non-visual components, double-click the value field in the Inspector for the desired event. Again, JBuilder generates the skeleton code and switches to the editor.
- Placing multiple components
To drop multiple identical components in the designer, hold down the Shift key when choosing a component on the component palette. Then, drop it multiple times in the designer. To deselect the multiple selection, click the Selection Arrow to the left of the component palette.
- Look at the status bar
The main status bar provides additional information about components and their position as you move the component in the designer. For example, when you resize a frame in the designer, the status bar displays the size of the frame as you resize it. When you drag components in the designer, the status bar displays the new location of the component.
- Modifying multiple components
Do you want to make the same changes to the properties of multiple components? Select all the components in the designer or the structure pane and make the changes in the Inspector. For example, to change the text on multiple buttons to the same font face and size, select all of the buttons and make the changes in the Inspector.
- Select a panel underneath a component
Use Alt+Click to select a panel underneath a component in JBuilder's designers.
- The designer's context menu
Right-click in the designer to view the context menu and select from such commands as: Cut, Copy, Paste, Undo, Redo, Look And Feel, Move, Look And Feel, and Constraints. The menu commands change according to the component selected and its layout manager.
- Get help on events and properties in the Inspector
Select the name of an event or property in the UI designer's Inspector and press F1 to view its reference documentation in the Help Viewer.
- Size and position objects quickly in the designer
When working with an XYLayout
or a null
layout, use the designer's context menu to size and position objects quickly and neatly.
- Use Ctrl+Click in the designer or structure pane to select several objects.
- Right-click an object in the designer to open the context menu.
- Select the Align or Same Size commands.
The first object selected is the reference point and the others are aligned or sized to match it. To deselect, click outside any selected object.
- Adjusting components with the designer's context menu
If you create a design in an XYLayout
or null
layout and plan to convert it to GridBagLayout
, use the designer's context menu Align and Same Size commands before converting the layout to ensure that objects fit exactly in the rows and columns. Otherwise, the GridBagLayout
might have more rows or columns than it needs.
- Opening JBuilder's designers
To open the menu designer, double-click the Menu node in the structure pane or select Activate Designer from the context menu. To open the column designer, a feature of JBuilder Professional and Enterprise, double-click the node for a DataSet or Column, or select Activate Designer from the context menu. To return to the UI designer, double-click the UI node in the structure pane or select Activate Designer from the context menu.
- Documentation in PDF format
JBuilder documentation is available in PDF format on the JBuilder CD and the web site.
- Tutorials
JBuilder provides a wide variety of tutorials. For a list of tutorials, choose Help|JBuilder Tutorials.
- Use your browser to view documentation
It's now easier to use your web browser to view the JBuilder documentation. Just unarchive all of the JAR files in the JBuilder doc
directory and point your browser to index.html
.
- Fast track to documentation
Use the Index in the Help Viewer to find your information quickly. The index displays index entries for all books. Choose the Index tab on the left side of the Help Viewer and begin typing the topic you want. Results are displayed in a list with the topic highlighted. Double-click the topic or choose enter if it is already selected in the list.
- Get help for methods
Context-sensitive help can be accessed using the F1 key with the caret over the method you want help for.
- Get help for Java keywords
Help on keywords can be accessed using the F1 key with the caret over the keyword you want help for.
- Match your braces
You can find matching braces by placing your caret immediately before an opening or closing brace and pressing Ctrl + ].
- Auto-align your braces
You can auto-align closing curly braces from the Tools|Editor Options|Editor page|Indent options.
- Bookmarks, bookmarks, everywhere...
Use these bookmark shortcuts for easy navigation:
- You can set a bookmark in the editor by putting the cursor on a line and then pressing Ctrl+Shift+n (where n can be any digit from 0-9).
- To go to a bookmark, press Ctrl+n.
- You can turn off a bookmark by pressing Ctrl+Shift+n.
- Configure end of line characters
Configure the line endings that the editor uses when saving a file on the Editor page of Project Properties (Project Properties). Choose from: Preserve Current Line Endings Within Files, Platform Native, Windows, UNIX, and Macintosh.
- Customize the editor
Right-click in the editor and choose Editor Options to quickly access the Editor Options dialog box where you can customize the editor and change options for keymapping, indent, tab, backup level, save, and search.
- Create new files
Create new files, such as XML and HTML files, using File|Open File and JBuilder's editor will recognize them and provide syntax highlighting. Choose File|Open File and enter a filename and extension in the File Name field to create a blank file. Then add it to your project.
- Closing files in the editor
To quickly close a file in the editor, Shift+Right-click its tab.
- Using the structure pane
While in the editor, the structure pane provides many time-saving features:
- Choose a class, interface, or field in the structure pane and press F1 for Javadoc.
- Move the focus to the structure pane and begin typing the name of of the element you want to search for in the file.
- Drill down into ancestor classes and interfaces. Double-click a class, interface, or the type of a variable in the structure pane to view its source code and Javadoc.
- Open the Imports folder and double-click a package to open the Browse Import Symbol dialog box where you can open a class file and view its source and Javadoc.
- Open the Errors folder to view any syntax errors in your code.
- Navigate to a line of code by selecting a class, interface, method, or field in the structure pane.
- Finding a symbol's definition
To find a symbol's definition, right-click the symbol in the editor and choose Find Definition. The source file where the symbol is defined is opened in the editor. The cursor is placed on the definition.
- Customize your keymapping with the Keymap Editor
You can use the Keymap Editor to customize the keymappings used for the Editor and IDE. Choose Tools|IDE Options|Browser page|Customize button or Tools|Editor Options|Editor page|Customize button. P E
- Optimize Imports
Use the Import Style page of the Project Properties dialog box (Project|Project Properties) to set up a style of imports you prefer. Then use the Optimize Imports right-click command in the editor to remove all unused imports and rewrite the import section of your class source file using the selected groupings and style. P E
- Managing imports for new classes
Often you create a class from existing code or copy code into an existing class. In the new class, needed classes are often not imported. A simple way to get around this is to create a template that has all your commonly used imports. You can then press Ctrl+j to add the imports to your class. Then, once the file has compiled and is reasonably complete, use the Optimize Imports right-click command to remove all the unused imports.P E
- Keymapping quick reference
You can access the listing of current keymappings using the Keymap Editor: Tools|IDE Options|Browser|Customize button and Tools|Editor Options|Editor|Customize button.
- Quick searching
Use Search|Incremental Search to quickly search in the editor. Enter the word in the Search For tool tip and use the arrow keys to search forward and back. Press Enter or Esc to exit.
- Search with Find In Path
Use Search|Find In Path to search multiple files. For example, find all the @todo
tags in your project or directory by entering @todo in the Text To Find field. The results are displayed in the message pane. Double-click a result to find the line of code in the editor.
- The many uses of Browse Classes
Use Search|Browse Classes or the Browse Classes button on the toolbar to view source for a class.
- Fast track to running your EJBs
If you want to run the container for the currently selected Application Server but don't want to have to go into the Project Properties to set up the settings, you can right-click an EJB module file, or the JAR file underneath it and select Run or Debug from the right-click menu. This will run the container for the currently selected Application Server using the JAR for this EJB module. If you want to use multiple JARS with this Application Server, you can select multiple EJB module files, and select Run or Debug. This will use all of the selected JARS to run the currently selected Application Server. E
- Hot deploying to a running EJB container
To quickly deploy, redeploy, or undeploy your EJBs to a running container, right-click the EJB module node or its child nodes in the project pane and choose Deploy Options For <Group Jar Name>.jar. A submenu appears that contains deployment options appropriate for your application server, such as Deploy, Redeploy, and Undeploy. E
- Use DataExpress with EJBs
You can now easily use EJBs with dbSwing and InternetBeans. Use the new DataExpress for EJB components to provide from and resolve to entity beans. E
- Zoom your help topics
Use the Options|Zoom In, Options|Zoom Out, and Options|Zoom Normal to increase and decrease the size of the text in the Help Viewer topic window.
- Browse web pages in the Help Viewer
Browse web pages in JBuilder's Help Viewer. Choose Help|Help Topics, then choose File|Open Page from the Help Viewer's menu. Enter a web URL in the Open URL dialog box.
- Finding documentation in the Help Viewer
There are several ways to find documentation in the Help Viewer:
- Contents: displays an expandable Table of Contents for all books.
- Index: displays the index entries for all books.
- Find: allows you to enter search words for all books.
- Search the documentation effectively
The Help Viewer's Index is the most effective way to search for a specific topic as it narrows the field. Choose Help|Help Topics and click the Index tab on the left side of the Help Viewer. Enter the search topic and press Enter to go to the document. Once in the document, you can choose Edit|Find In Page from the Help Viewer menu to search within the document.
- Use Find to search the documentation
Find includes all reasonable words in the books. Select Help|Help Topics and choose the Find tab. Find supports Boolean searches: word1 word2
is OR
and word1 + word2
is AND
.Note: For more effective searches, it's recommended to use the Index, not Find.
- Run the Help Viewer in a separate VM
You can run the Help Viewer in a separate VM, so you can access help while a modal dialog is being displayed. Add this line of code to the jbuilder.config
file located in the JBuilder bin
directory:
vmparam -Dcom.borland.jbuilder.help.vm=true
- View a list of tips
To view Tip of the Day as a complete, categorized list, choose Help|Quick Tips.
- Print to HTML
Using JBuilder's Print To HTML feature, it is easy to save a Java source file to an HTML file that matches the color scheme of your editor settings. Select File|Print and select the HTML File option. You can use this JBuilder-generated HTML file for several purposes:
- As a colorful code snippet e-mail attachment.
- As a colorful programming example on your web site.
- As a means for viewing Java code on your handheld device.
- Right-click your way to the menus
Many of the main menu functions are available when you right-click on items in the IDE, including the project pane, structure pane, content pane, editor, and many other locations.
- Showing and hiding the message pane
Ctrl+Alt+M toggles the display of the message pane in the CUA keymapping, providing more screen real estate in the content pane. For a complete list of keymappings, see Help|Keyboard Mappings. The Messages button on the main toolbar also toggles the message pane.
- Showing and hiding the structure and project panes
Ctrl+Alt+Z toggles the display of the structure and project panes, providing more screen real estate in the content pane.
- Match as you type
In the project, structure, and message panes, if you start typing, it does a "starts with" match. But you can use the * to do a "contains", e.g. "*data"; or use ? for a single character. The dot (.) locks you into the current branch. You can use the up and down arrows to move between matches.
- Audio in the IDE
Enable and disable audio, adjust audio levels, and choose different audio themes and audio for events on the Audio page of the IDE Options dialog box (Tools|IDE Options). Press Help to find out how to add your own custom audio files to the IDE.
- Parse delay and large files
When working on large files, increase the parse delay so parsing does not occur as frequently. Right-click in the structure pane and choose Properties to adjust the parse delay.
- Change the text color of error messages
You can change the color of the compiler error messages by choosing Tools|IDE Options|Browser.
- File tab menu
You can run, debug, make, and rebuild directly from the file tab menu in the content pane. Right-click the file tab to choose any of these menu items. The source file must have a public static main()
method for Run and Debug to appear on the menu.
- Forward and Back arrows
Use the Forward and Back arrows on the main toolbar to move between files previously visited when doing a Find Definition from the editor's right-click menu.
- Duplicate files
Use File|Save As to duplicate a file in another location.
- -classpath information
When you run your application in the IDE, JBuilder displays the project's -classpath information in the message pane. Copy and paste this classpath into a console window when executing a command that requires a classpath or paste it into a batch file.
- AppBrowser icons
For definitions of JBuilder's AppBrowser icons, see Help|JBuilder Environment. Choose "Working in the AppBrowser" and search in the chapter for "AppBrowser icons".
- File types
If you want to work with a file type that JBuilder doesn't recognize, you can associate it with a similar file type using the Recognized File Types list on the File Types page (Tools|IDE Options|File Types).
- Help|About JBuilder|Info
Check class paths, library paths, and other property values or force garbage collection (Force GC) on the Info page of the JBuilder About box. To copy a value to the clipboard, right-click a row and choose Copy To Clipboard. To view a long property value, such as the class path, double-click the value field.
- Customize the content pane tabs
Customize the orientation, label type, and insertion of the content pane tabs on the Browser page of IDE Options. Choose Tools|IDE Options|Browser.
- Open a file in a new AppBrowser
To open a file in your project in a new JBuilder AppBrowser, right-click a file in the project pane and choose Open In New Browser. P E
- Browse web pages in the IDE
Browse web pages in JBuilder and never leave the IDE! Enter a web URL on the View or Web View page of the content pane.
- Build archives and EJB modules on demand
Projects build faster if you create archives and EJB modules only when you need them. To disable automatic creation, right-click the archive or EJB module node in the project pane, choose Properties, select the Archive page, and uncheck Always Create Archive When Building The Project. To build, choose Make or Rebuild from the node's right-click menu. P E
- Enable/disable features in the IDE
Add a line of code to the jbuilder.config
file in the JBuilder bin
directory to enable and disable features found in Personal and Professional. This is useful when you're developing OpenTools and you want to be sure they work in the JBuilder edition you're targeting. P E
For Personal, add this line of code:
vmparam -Dcom.borland.jbuilder.sku="personal"
For Professional, add this line of code:
vmparam -Dcom.borland.jbuilder.sku="pro"
- Create Javadoc in JBuilder
Use the Javadoc wizard (Wizards|Javadoc) to create a documentation node that holds properties for a Javadoc run. A single project can have multiple Javadoc paths, so that different packages can use different Javadoc options. Right-click a node and choose Make to create Javadoc. P E
- Display Javadoc in the AppBrowser
Open a source file in the editor and click the Doc tab to display Javadoc. If Javadoc exists for that file, it will be displayed.
- Create a documentation archive
Use the Archive Builder (Wizards|Archive Builder) to create a documentation archive for your Javadoc files. P E
- Add Javadoc @todo tags
Add Javadoc @todo
tags to your code using code templates. Enter todo
, then Ctrl+J to expand the @todo
template.
- Browse Javadoc @todo tags
The structure pane displays a To Do
folder that lists all /** @todo */
comments in the current source file. P E
- Add Javadoc comments for methods, fields, and constructors
Use JBuilder's comment template to automatically include Javadoc tags for parameters and exceptions.In the editor, position the cursor immediately before the method, field or constructor signature. Type /** and press Enter to expand the comment. P E
- Add Javadoc comments for classes and interfaces
Use JBuilder's comment template to automatically include Javadoc for class and interface level comments. In the editor, position the cursor immediately before the class or interface declaration. Type /** and press Enter to expand the comment. Tags are added for author and version. Informational comments are added for title, description, and copyright. P E
- Javadoc conflict reporting
A Javadoc conflict occurs when the tagging in a Javadoc comment does not match the method signature or if no argument is provided in a tag. Javadoc conflicts are reported at the top of the structure pane in the Javadoc Conflicts
folder. Expand the folder and click the conflict to go to the method signature where the conflict occurred. P E
- Easy Javadoc maintenance
To ensure that your documentation output matches your source files, delete the contents of the project's documentation directory before your last Javadoc run. Because Javadoc does not delete files in the output directory that are no longer needed, you might deliver obsolete documentation files that do not correspond to any source files. P E
- Creating a custom doclet for the Javadoc wizard
Create a custom doclet with the OpenTools API. A custom doclet does not need to produce HTML files. For example, custom tags can be used in conjunction with the Javadoc tool's ability to parse source files. The doclet could then generate XML files or additional Java files. P E
- View Javadoc from a UML diagram
Right-click a class or package name in a UML diagram and choose View Javadoc or press F1. E
- View "on-the-fly" Javadoc
Open a source file in the editor and click the Doc tab to display Javadoc. If no Javadoc is found for that file, "on-the-fly" Javadoc, created directly from comments in the source file, is displayed. P E
- Backup Your JSPs With Your Projects
If you would like the backups for your JSPs to be stored in the project backup directory rather than the JSP directory, simply add an entry for the JSP directory to your project's source path. P E
- Catch errors in JSPs early
JBuilder does a test compilation of JavaServer Pages when you make your project. This lets you fix minor errors right away instead of hitting them after you load your web server. To speed up compiles when you're confident your JSPs are free of errors, uncheck the option on the JSP tab of the Build page in the Project Properties dialog box (Project|Project Properties|Build page). P E
- JDataStore supports the IN keyword
JDataStore clients can now use IN(val1, val2, val3)
to test for a match with one of three values. This is one of many SQL parser enhancements in the 100% Java relational database bundled with JBuilder. P E
- JDataStore supports the JOIN keyword
JDataStore clients can now use table1 FULL OUTER JOIN table2 USING column1
as a new syntax for joining table1 and table2. This is one of many SQL parser enhancements in the 100% Java relational database bundled with JBuilder. P E
- Visually modify table structures with JDataStore
Open a JDataStore in the JDataStore Explorer. Select a table in the tree, and click the Structure tab. You can add or drop columns, and/or change existing column's characteristics, such as their data type, size, etc. You can also visually create tables from scratch via Tools|Create Table. P E
- Import tables to a JDataStore
Open a JDataStore in the JDataStore Explorer. Select Tools|Import|Tables to import tables from any JDBC datasource. If you wish, you can make changes to your local copies of the tables and resolve the changes back to the original database. If you prefer to have your own program do this, use the DataStorePump and DataStoreSync components. P E
- Editing the JDK definition
You can edit your JDK definitions. Select Tools|Configure JDKs. From there, either click the Change button and navigate to the new JDK home directory or edit the path field directly.
- Switch your JDK
You can compile against a different JDK than the one JBuilder is hosted on. Select Project|Project Properties|Paths. Click the ellipsis button next to the JDK field. Select a JDK from the list or click the New button to open the New JDK wizard and add another JDK to the list. P E
- Find everything you need in the libraries
JBuilder uses libraries to find everything it needs to run a project as well as for browsing through source, viewing Javadoc, using the visual designer, applying CodeInsight, and compiling code. Libraries are collections of paths that include classes, source files, and documentation files. Individual library paths are often contained in JAR or ZIP files but can also be contained in directories.
- Add to your library
You can add a library in the Configure Libraries dialog box (Tools|Configure Libraries). Select New to use the New Library wizard to add a new library. Once a library has been added, you can add it to your project. Select Project|Project Properties. On the Paths page, click the Required Libraries tab, and click Add.
- Automatically add packages to your projects
You can automatically add packages from your package-name-hierarchies through the Project|Project Properties dialog box. Select the General tab and check the Enable Source Package Discovery And Compilation option. P E
- Import an existing application
Quickly import an existing application into JBuilder with the Import Project wizard. Choose File|New, select the Project tab, and double-click the Import Project icon. On the first page of the Import Project wizard, specify the parent directory for your source, classes, and other files. The wizard then analyzes the directory's contents and, on the second page, proposes paths for the project. You can modify these paths in the wizard or, afterwards, in Project|Project Properties on the Paths page. On the second page
of the wizard, you can modify these default values. P E
- Rename refactoring a package
To rename refactor a package, open the package's UML diagram. Select the package name, right-click and choose Rename. Enter the package's new name in the refactoring dialog box and click OK. The package and all sub-packages are moved to the new directory structure. E
- Rename refactoring a class
To rename refactor a class, open the class source file in the editor or display the UML class diagram. Select the class name, right-click and choose Rename. Enter the class' new name in the refactoring dialog box and click OK. The class and all references to the class are renamed. P E
- Move refactoring a class to another package
To move refactor a class to another package, open the class source file in the editor or display the UML class diagram. Select the class name, right-click and choose Move. Enter the class' new package in the refactoring dialog box and click OK. The class is moved to the new package and all imports and dependencies are updated. P E
- Rename refactoring a method
To rename refactor a method, open the source file in the editor or display the UML class diagram. Select the method name, right-click and choose Rename. Enter the method's new name in the refactoring dialog box. To rename the method only in this class and in its descendents, turn off Refactor Ancestors. Create a forwarding method by clicking the Create Forwarding Method option. Click OK. P E
- Rename refactoring a field
To rename refactor a field, open the source file in the editor or in a UML class diagram. Select the field, right-click and choose Rename. Enter the field's new name in the refactoring dialog box and click OK. P E
- Rename refactoring a local variable
To rename refactor a local variable, open the source file in the editor. Select the variable name, right-click and choose Rename. Enter the new name in the refactoring dialog box and click OK. Note that a method parameter is treated as a local variable. P E
- Rename refactoring a property and its getter and setter
To rename refactor a property and its getter and setter methods, open the UML class diagram. Select the property, right-click and choose Rename. Enter the new name in the refactoring dialog box and click OK. E
- Finding references to a symbol
To find references to a symbol, right-click the symbol in the editor and choose Find References. References are displayed on the Search Results tab of the message pane. Class and method references are sorted by category. Field and local variable references are sorted by file name. P E
- Previewing a refactoring
To preview a refactoring, choose the View References Before Refactoring option in a refactoring dialog box. To commit the changes, click the Refactor button on the Refactoring tab toolbar. P E
- Undoing a refactoring
To undo a refactoring, click the Undo button on the Refactoring toolbar. Undo immediately, before you make other changes to files. You can then redo the refactoring by clicking the Refactor button on the toolbar. Undo is active as long as the Refactoring tab is open. P E
- Working with JBuilder samples
JBuilder provides many samples for your use. If you have installed JBuilder as root but are running as a regular user, you need to copy the entire samples tree to a directory in which you have full read/write permissions in order to run them.
- Tutorial samples
Some of the JBuilder tutorials are available as samples. Look for the Tutorials
directory in the samples
directory.
- Synchronize Scrolling
Synchronize the scrolling between the source views in the version control features and the editor's source view. JBuilder finds the nearest matching line in the other view, keeping you in the relevant code. Use Synchronize Scrolling by clicking the icon button in the History pages or the checkbox in the Compare Files dialog box.
- Resolve differences between file versions
In the History Diff page, make the "From" selection the file revision that has the version of a code block you want to use. Make the "To" selection the Buffer version. Navigate to the block of code that you want to change back. Click the Undo button in the gutter. The changes will be revoked and the old version of that diff will be in your buffer. P E
- Browsing a project
With Visual SourceSafe and CVS, you can look at all of the changed files in a project, see their status in version control, view the latest diffs, and decide which files to view and which to hide. Select Team|Status Browser. E
- Pull a project
The quickest way to pull a project that's in VCS and get it into your workspace is to use the object gallery. Select File|New, choose the Project tab, and select the VCS that your project is under: CVS, Visual SourceSafe, or ClearCase. E
- Custom-commit a project in version control
The Commit Browser in Visual SourceSafe and CVS provides one-stop, project-wide version control. It displays the status and diffs of all the changed files in your project, lets you select individual commands to apply to each changed file, and then commit the entire project. You can apply individual comments to each file or summary comments to all the files in the project. Select Team|Commit Browser. E
- View versions, comments, and VCS logs
Click the History tab in the content pane and select the Info page. You can see the revisions of the active file with the full text of the comments and logs associated with each revision. E
- View UML diagrams to visualize your code
Compile your project and choose the UML tab to view a UML diagram for the open file. E
- Exclude classes and packages from your UML diagrams
You may want to simplify you UML diagrams by excluding classes and packages. Choose Project|Project Properties and click the UML tab. Add any classes and packages that you want excluded from the diagram to the exclusion list. Use the Enable Class Filtering command on the UML context menu to enable and disable your filtering. Even if packages and classes are excluded from a diagram, they still appear in the structure pane. E
- Customize your UML diagrams
Choose Tools|IDE options and click the UML page to customize your UML diagrams. Set such options as sorting and grouping of elements, color of elements, and font family and size. E
- Use the UML browser's context menu for easy access to many features
Many refactoring and UML features are available on the UML browser's context menu, such as Rename, Move, Save Diagram, Enable Class Filtering, Go To Diagram, Go To Source, Find References, Rename Property, and View Javadoc. E
- Save a UML diagram as an image
Right-click in a UML diagram and choose Save Diagram to save the diagram as a PNG file. E
- View source from a UML diagram
Right-click a class name in a UML diagram and choose Go To Source. E
- View another UML diagram
Right-click a class or package name in a UML diagram and choose Go To Diagram. You can also double-click a class or package name to view its UML diagram. E
- Change visibility icons in a UML diagram
To change the visibility icons displayed in UML diagrams for public, private and protected, choose Tools|IDE Options and choose the UML page. The Use Visibility Icons option displays JBuilder's icons which are also used in the structure pane. Unchecking this option displays the standard UML visibility icons: +, -, and #. E
- Display properties separately in a UML diagram
To display properties separately in a UML diagram, choose Tools|IDE Options and choose the UML page. The Display Properties Separately option displays properties at the bottom of the class diagram. E
- Use the structure pane to navigate to other UML diagrams
Double-click a class or interface in the structure pane to view its UML diagram. Right-click a package and choose Open to view a package diagram. E
- Learn more about UML diagrams in the structure pane
Examine the structure pane to learn more about your UML diagrams. The structure pane displays a tree view of relationships organized by category, such as dependencies, reverse dependencies, and associations. You can also use the structure pane to navigate to other UML diagrams. E
- Auto scrolling in the UML browser
To quickly scroll a UML diagram in the UML browser, click the mouse and drag the diagram. E
- Navigating UML diagrams
Use the Forward and Back buttons on the main toolbar to browse previously viewed UML diagrams. E
- Run and debug unit tests quickly
Run and debug unit tests quickly by right-clicking the tab for a unit test that is open in the editor or right-clicking the name of the unit test in the project pane and selecting Run Test or Debug Test from the context menu. E
- Write your unit tests first
Test first design is possible by generating a skeleton TestCase
without any test methods using the TestCase wizard. To do this, just don't select any methods in the first step of the TestCase wizard. E
- Locate failed unit tests quickly
Go directly to the line of code causing a unit test failure in the editor by clicking the failure message in the message view. This feature is available when using JBuilder's JBTestRunner or JUnit's TextUI as your test runner. E
- Three different test runners are available
In addition to JBuilder's JBTestRunner, you can also use JUnit's TextUI and SwingUI for running your unit tests within JBuilder. To change your test runner, go to Project|Project Properties, select the Run page, click the Test tab, and select a test runner. E
- JBuilder shares HTML and JSP files with your HTML design tool
Use the Web Application wizard to create a WebApp node in a JBuilder project. Make the WebApp's directory the one that contains your HTML and JSP files. Now all these files will show up in your JBuilder project; you don't have to add them to the project individually. When you create or edit files using your HTML design tool, just click Refresh on the project toolbar to update JBuilder. P E
- Minimize web server overhead during development
If your application server supports it, you can use your application server as your web server. Select the appropriate option on the Servers page of the Project Properties dialog box. You can also run several web applications in the same web server. Select the Use Web View On Running Process launch option on the Web tab of the IDE Options dialog box. P E
- Package an application for Web Start in two steps
First, create a JAR for your application files using the Archive Builder (Wizards|Archive Builder). Second, run the Web Start Launcher wizard to create a sample home page and a .jnlp
file. When you make the homepage available in a web server, users who have Web Start installed can launch the application with a single click on the link in the homepage. P E
- Test your web application in multiple browsers
JBuilder displays web applications in its built-in browser. To check browser-specific behavior, copy the URL there and paste it into an external browser such as Netscape Navigator or Internet Explorer. To test how your application handles multiple users, exercise it in several browsers at once. P E
- Insert database data into HTML pages with InternetBeans Express
InternetBeans Express components connect DataExpress components with tables, text fields, and other controls in JSPs and HTML pages. You decide at runtime what data to display. InternetBeans Express inserts it into your HTML while retaining all your layout and formatting. P E
- Change your code style
You can change the style of JBuilder-generated code from Project|Project Properties|Code Style.
- Quick access to wizards
Choose the New button on the main toolbar to open the object gallery and access many of JBuilder's wizards.
- Project wizard shortcut
If all of your projects are closed, you can quickly open the Project wizard by choosing another wizard. For example, if you are creating an application, choose the Application wizard in the object gallery (File|New) and the Project wizard opens first.
- Quick access to the object gallery and wizards
Ctrl+N in most editor keybindings opens the object gallery where you have access to many of the JBuilder wizards. For Macintosh, use Command+N. For a complete list of keyboard commands, see Help|Keyboard Mappings.
- Make localization of your application easier
You can prepare your application for translation by running the Resource Strings wizard. P E
- Quick XML data reporting
Use the command-line utility jsql
to produce XML output from a database query. UNIX systems can produce quick printed XML reports by typing jsql <sql-filename>|lpr
from a terminal window. P E
- XML and the editor
The editor automatically recognizes the "encoding" tag in XML headers and displays the XML file using this encoding tag. You can add multiple XML files with different encodings in the same project, and you don't have to worry about setting the project's encoding when adding XML files. P E
- Transforming XML
If transforming an XML document fails, check to see if you're using the correct version of the stylesheet specification: "http://www.w3.org/1999/XSL/Transform". P E
- XML wizards
Many of the XML wizards are available from the right-click menu in the project pane. Right-click an XML, XSD, or DTD file to see what's available. These wizards are also found on the XML page of the object gallery (File|New). P E
- Validating XML
Right-click an XML file in the project pane and choose Validate to validate the XML against a schema (XSD) or DTD. Validation errors display in the structure pane and the message pane. P E
- XML viewer
JBuilder's XML viewer displays XML documents in a JavaScript, collapsible tree view. To enable the XML viewer, choose the XML page of the IDE Options dialog box (Tools|IDE Options) and check the Enable Browser View option. Open an XML document in the editor and click the View tab. P E
- Databinding wizard
Use the Databinding wizard to generate Java classes from a schema or DTD. Right-click the schema or DTD file in the project pane and choose Generate Java. E
- XML database components
JBuilder's XML database support is available through a set of components on the XML page of the designer's component palette. E