Keyboard shortcuts
While programming with JBuilder 2, we can use a lot of different shortcut keys for functions we often perform.
This is a list of very usefull shortcut keys:
- Ctrl-Space
When typing our code, we sometimes don't know the exact name of a method or data member of the class we are working on.
By pressing Ctrl-Space JBuilder will show all relevant method names and properties we can use at the context we are working at.
We can search in this list by pressing the first letters of the method or property we are looking for.
It is also possible to first type the first letters of the name of a method or property, and then press Ctrl-Enter, JBuilder will then automatically jump in the list to the names which start with the typed letters.
If we press Ctrl-Space after the keyword import, JBuilder will open the Package Browser. From this list we can select a package or class and JBuilder will insert the name of the package or class after the import statement.
We have to use Ctrl-Alt-Space for this kind of functionality if we are in the body of our class. (See below)
- Ctrl-Shift-Space
Pressing this shortcut key will show the parameter list for the method or constructor we are invoking.
- Ctrl-Enter
If our cursor is inside the name of an object, we can drill down to the definition of this object, by pressing Ctrl-Enter.
This will work for the absolute name of the class, but also if the cursor is inside the name of a instantiated class.
To drill down into an object definition by only using the keyboard, JBuilder provides also another way:
the undocumented Ctrl-/ key combination.
If we press Ctrl-/ an extra command line is opened in the JBuilder main window, where normally the status message are shown.
By typing in the name of the symbol or object we are looking for, we can go to the definition of this object.
- Ctrl-Alt-Space
This key combination opens the Package browser.
We can select a class from the available classes, and JBuilder will insert the name of the class at the cursor position, and will insert the appropriate import statement at the top of our source file.
- Alt-[
Finds corresponding delimeter for the delimeter your cursor is in front of.
Especially usefull when we are working in a line of code with a lot of different delimeters, and it isn't obvious anymore if we have closed all opening delimeters.
By pressing this shortcut key, we can search for the matching delimeter quickly.
The shortcut works for the following delimeters: (, {, [, <, */, or ".
- Ctrl-Shift-I and Ctrl-Shift-U
To keep our source code readable we use indentation.
If we want to indent a selected block of text we must use the Ctrl-Shift-I shortcut key.
To outdent a selected block we use the Ctrl-Shift-U key combination.
- Ctrl-Shift-number and Ctrl-number
If we want to jump back and forward in our source code, it is easy if we can keep some sort of reminder at these position.
JBuilder provides us with bookmarks we can set and jump to.
To set a bookmark with a specific number we use Ctrl-Shift-number, and we type Ctrl-number to go back to bookmark.
To see more shortcut keys we can go to the JBuilder help and type keybindings in the Master index page.