You are on page 1of 2

Highlights of NetBeans IDE 6.

1 Keyboard Shortcuts & Code Templates


Finding, Searching, and Replacing Alt-Shift Left/ Shift lines left/right/up/down Ctrl-Shift-U Create JUnit test
Right/Up/Down Ctrl-F6/Alt-F6 Run JUnit test on file/project
Ctrl-F3 Search word at insert point Ctrl-Shift-Up/D Copy lines up/down F6/Shift-F6 Run main project/file
F3/Shift-F3 Find next/previous in file Ctrl/Alt-F12 Inspect members/hierarchy
Ctrl-F/H Find/Replace in file Ctrl-/ Add/remove comment lines Opening and Toggling between Views
Alt-F7 Find usages Ctrl-E Delete current line Ctrl-Tab (Ctrl-`) Toggle between open
Ctrl-Shift-F/H Find/replace in projects
documents
Alt-Shift-U Find usages results Coding in C/C++
Shift-Escape Maximize window (toggle)
Alt-Shift-H Turn off search result highlights
Alt-Shift-C Go to declaration Ctrl-F4/Ctrl-W Close currently selected window
Ctrl-R Rename
Ctrl-F9 Evaluate expression Ctrl-Shift-F4 Close all windows
Ctrl-U, then U Convert selection to uppercase
Shift-F10 Open contextual menu
Ctrl-U, then L Convert selection to lowercase Coding in Ruby Alt-Shift-D Undock window
Ctrl-U, then S Toggle case of selection
Ctrl-Shift-V Paste formatted Ctrl-Shift-A Jump Rails action > view
Debugging
Alt-Shift- Select Next/Previous element
Navigating through Source Code Period/Comma Ctrl-F5 Start debugging main project
Ctrl-Shift-Space Show documentation Ctrl-Shift-F5 Start debugging current file
Ctrl-O/Alt-Shift-O Go to type/file
Ctrl-Shift-T Jump from test file to file Ctrl-Shift-F6 Start debugging test for file
Ctrl-Shift-T Go to JUnit test
(JUnit)
Alt-O Go to source SOA Shift-F5/F5 Stop/Continue debugging session
Ctrl-B Go to declaration
Tab-Shift-Arrows Move through elements F4 Run to cursor location in file
Ctrl-G Go to line
Alt-Shift-F Advanced search F7/F8 Step into/over
Ctrl-Shift-M Toggle add/remove bookmark
Alt/Shift-Enter Expand/collapse elements Ctrl-F7 Step out
Ctrl-Shift- Next/previous bookmark
Ctrl-Shift-F9 Show BPEL Mapper Ctrl-Alt-Up Go to called method
Period/Comma
Ctrl-Alt-Down Go to calling method
Ctrl-Period/CommaNext/previous usage/compile UML Ctrl-F9 Evaluate expression
error
Alt-Shift-A/O Insert attribute/operation into Ctrl-F8 Toggle breakpoint
Ctrl-Shift-1/2/3 Select in Projects/Files/Favorites
selected element Ctrl-Shift-F8 New breakpoint
Ctrl-[ Move caret to matching bracket
Ctrl-Shift-F Fit diagram into window Ctrl-Shift-F7 New watch
Ctrl-K/Ctrl-Shift K Next/previous word match
Alt-Left/Alt- Go backward/forward/to last F8 Toggle Overview window
Right/Ctrl-Q edit Ctrl-Shift-5 Select active UML diagram

Coding in Java Compiling, Testing, and Running

Alt-Insert Generate code F9 Compile package/ file


Ctrl-Shift-I Fix all class imports F11 Build main project
Alt-Shift-I Fix selected class's import Shift-F11 Clean & build main project
Alt-Shift-F Format selection Ctrl-Q Set request parameters
Highlights of NetBeans IDE 6.1 Keyboard Shortcuts & Code Templates
When typing in the Source Editor, you can generate the im implements jspi <jsp:include page="|"/>
text in the right-column of the following list by typing iof instanceof <jsp:plugin type="|" code=""
jspp
the abbreviation that is listed in the left-column and then ir import codebase=""></jsp:plugin>
pressing Tab. le length jsps <jsp:setProperty name="|" property=""/>
newo Object name = new Object(args); jspu <jsp:useBean id="I" type=""/>
Java Editor Code Templates pe protected oup out.print("|")
En Enumeration pr private oupl out.println("|")
Ex Exception psf private static final pcg pageContext.getAttribute("|")
Ob Object psfb private static final boolean pcgn pageContext.getAttributeNamesInScope("|")
Psf public static final psfi private static final int pcgs pageContext.getAttributesScope("|")
Psfb public static final boolean psfs private static final String pcr pageContext.removeAttribute("|")
Psfi public static final int pst printStackTrace(); pcs pageContext.setAttribute("|",)
Psfs public static final String psvm public static void main(String[] args){ pg <%@page |%>
St String } pga <%@page autoFlush="false"%>
ab abstract pu public pgb <%@page buffer="|kb"%>
bo boolean re return pgc <%@page contentType="|"%>
br break serr System.err.println ("|"); pgerr <%@page errorPage="|"%>
ca catch ( sout System.out.println ("|"); pgex <%@page extends="|"%>
cl class st static pgie <%@page isErrorPage="true"%>
cn continue sw switch ( pgim <%@page import="|"%>
df default: sy synchronized pgin <%@page info="|"%>
dowhile do { tds Thread.dumpStack(); pgit <%@page isThreadSafe="false"%>
} while (condition); th throws pgl <%@page language="java"%>
eq equals trycatch try {} pgs <%@page session="false"%>
ex extends catch (Exception e) {} rg request.getParameter("|")
fa false tw throw sg session.getAttribute("|")
fi final twn throw new sp session.setAttribute("|", )
fl float wh while ( sr session.removeAttribute("|")
forc for (Iterator it = collection.iterator(); whileit while (it.hasNext()) { tglb <%@taglib uri="|"%>
it.hasNext();) { Object elem = (Object) it.next();
} To Change Default Settings:
Object elem = (Object) it.next();
} JSP Editor Code Templates 1. Choose Tools > Options from the main menu.
fore for (Object elem : iterable) { 2. For code templates, select Editor and click the Code
} ag application.getAttribute("|") Templates tab. Here you can also change the
fori for (int i = 0; i < arr.length; i++) { ap application.putAttribute("|",) expansion key, from Tab to something else.
} ar application.removeAttribute("|") 3. For keyboard shortcuts, select Keymap and choose a
fy finally cfgi config.getInitParameter("|") profile from the Profile drop-down list.
ie interface jspf <jsp:forward page="|"/>
ifelse if (condition){}else { <jsp:getProperty name="|" Complete List of Keyboard Shortcuts:
jspg
} property="" /> wiki.netbeans.org/wiki/view/KeymapProfileFor60