javawaveblogs-20

Wednesday, September 19, 2007

NetBeans 6.0 Keyboard Shortcuts

Finding, Searching, and Replacing

Ctrl-F3 Search word at insert point
F3/Shift-F3 Find next/previous in file
Ctrl-F/H Find/Replace in file
Alt-F7 Find usages
Ctrl-Shift-P Find/replace in projects
Alt-Shift-U Find usages results
Alt-Shift-H Turn off search result

highlights

Alt-Left Next in jump list
Alt-Right Previous in jump list
Ctrl-R Rename
Ctrl-U, then U Convert selection to

uppercase
Ctrl-U, then L Convert selection to

lowercase
Ctrl-U, then S Toggle case of selection
Alt-Shift-V Paste formatted

Navigating through Source Code
Ctrl-O/Alt-Shift-O Go to type/file
Ctrl-Shift-T Go to JUnit test
Alt-O Go to source
Ctrl-B Go to declaration
Ctrl-G Go to line
Ctrl-Shift-M Toggle add/remove

bookmark
Ctrl-Shift-Next/previous bookmark
Period/Comma
Ctrl-Next/previous
Period/Comma usage/compile error
Ctrl-Shift-1/2/3 Select in

Projects/Files/Favorites
Ctrl-[ Move caret to matching
bracket
Ctrl-K/Ctrl-Shift KNext/previous word match

Coding in Java

Alt-Insert Generate code
Ctrl-Shift-I Fix all class imports
Alt-Shift-I Fix selected class's import
Alt-Shift-F Reformat selection
Alt-Shift-Shift tab to the left/right
Left/Right
Ctrl-/ Add/remove comment lines
Ctrl/Alt-F12 Inspect members/hierarchy
Ctrl-E Delete current line

Compiling, Testing, and Running

F9 Compile package/ file
F11 Build main project
Shift-F11 Clean & build main project
Ctrl-Q Set request parameters
Ctrl-Shift-U Create JUnit test
Ctrl-F6/Alt-F6 Run JUnit test on file/project
F6/Shift-F6 Run main project/file

Opening and Toggling betweenViews

Ctrl-Tab (Ctrl-`) Toggle between open

documents
Shift-Escape Maximize window (toggle)
Ctrl-F4/Ctrl-W Close currently selected

window
Ctrl-Shift-F4 Close all windows
Shift-F10 Open contextual menu
Alt-Shift-D Undock window

Debugging

Ctrl-F5 Start debugging main project
Ctrl-Shift-F5 Start debugging current file
Ctrl-Shift-F6 Start debugging test for file

(JUnit)
Shift-F5/F5 Stop/Continue debugging

session
F4 Run to cursor location in file
F7/F8 Step into/over
Ctrl-F7 Step out
Ctrl-Alt-Up Go to called method
Ctrl-Alt-Down Go to calling method
Ctrl-F9 Evaluate expression
Ctrl-F8 Toggle breakpoint
Ctrl-Shift-F8 New breakpoint
Ctrl-Shift-F7 New watch

When typing in the Source Editor, you can generate the
text in the right-column of the following list by typing
the abbreviation that is listed in the left-column and
then pressing Tab.

Java Editor Code Templates

En
Enumeration

Ex
Exception

Ob Object
Psf public static final

Psfb
public static final boolean

Psfi
public static final int

Psfs
public static final String

St
String

ab abstract
bo boolean

br break
ca catch (
cl class

cn continue
df default:

dowhile
do {
} while (condition);

eq
equals

ex extends
fa false

fi final
fl float

forc for (Iterator it = collection.iterator();
it.hasNext();) {
Object elem = (Object) it.next();
}
fore for (Object elem : iterable) {
}
fori for (int i = 0; i < arr.length; i++) {
}

fy
finally

ie
interface

ifelse if (condition){}else {
}
im implements
iof instanceof

ir
import

le
length

newo
Object name = new Object(args);

pe
protected

pr private
psf private static final
psfb private static final boolean
psfi private static final int
psfs private static final String
pst printStackTrace();

psvm
public static void main(String[] args){

}
pu public
re return
serr System.err.println ("|");
sout System.out.println ("|");
st static
sw switch (
sy synchronized
tds Thread.dumpStack();
th throws
trycatch try {}

catch (Exception e) {}
tw throw
twn throw new
wh while (
whilei while (it.hasNext()) {

Object elem = (Object) it.next();
}

No comments:

diggthis