Finding, Searching, and Coding in Java Compiling, Testing, and Running Replacing F9 Compile package/ file Alt-Insert Generate code Ctrl-F3 Search word at insert point Ctrl-Shift-I Fix all class imports F11 Build main project F3/Shift-F3 Find next/previous in file Alt-Shift-I Fix selected class's import Shift-F11 Clean & build main project Ctrl-F/H Find/Replace in file Alt-Shift-F Format selection Ctrl-Q Set request parameters Alt-F7 Find usages Alt-Shift Left/ Shift lines left/right/up/down Ctrl-Shift-U Create JUnit test Ctrl-Shift-P Find/replace in projects Right/Up/Down Ctrl-F6/Alt-F6 Run JUnit test on file/project Alt-Shift-U Find usages results Ctrl-Shift-Up/D Copy lines up/down F6/Shift-F6 Run main project/file Alt-Shift-H Turn off search result Ctrl/Alt-F12 Inspect members/hierarchy highlights Opening and Toggling between Ctrl-/ Add/remove comment lines Ctrl-R Rename Ctrl-E Delete current line Views Ctrl-U, then U Convert selection to Ctrl-Tab (Ctrl-`) Toggle between open uppercase Coding in C/C++ documents Ctrl-U, then L Convert selection to Shift-Escape Maximize window (toggle) Alt-Shift-C Go to declaration lowercase Ctrl-F4/Ctrl-W Close currently selected Ctrl-F9 Evaluate expression Ctrl-U, then S Toggle case of selection window Alt-Shift-V Paste formatted Coding in Ruby Ctrl-Shift-F4 Close all windows Navigating through Source Code Shift-F10 Open contextual menu Ctrl-Shift-A Jump Rails action > view Alt-Shift-D Undock window Ctrl-O/Alt-Shift-O Go to type/file Alt-Shift- Select Next/Previous Ctrl-Shift-T Go to JUnit test Period/Comma element Debugging Alt-O Go to source Ctrl-Shift-Space Show documentation Ctrl-Shift-T Jump from test file to file Ctrl-F5 Start debugging main project Ctrl-B Go to declaration Ctrl-Shift-F5 Start debugging current file Ctrl-G Go to line SOA Ctrl-Shift-F6 Start debugging test for file Ctrl-Shift-M Toggle add/remove (JUnit) bookmark Tab-Shift-Arrows Move through elements Shift-F5/F5 Stop/Continue debugging Ctrl-Shift- Next/previous bookmark Alt-Shift-F Advanced search session Period/Comma Alt/Shift-Enter Expand/collapse elements F4 Run to cursor location in file Ctrl- Next/previous Ctrl-Shift-9 Show BPEL Mapper F7/F8 Step into/over Period/Comma usage/compile error UML Ctrl-F7 Step out Ctrl-Shift-1/2/3 Select in Ctrl-Alt-Up Go to called method Projects/Files/Favorites Alt-Shift-A/O Insert attribute/operation Ctrl-Alt-Down Go to calling method Ctrl-[ Move caret to matching into selected element Ctrl-F9 Evaluate expression bracket Ctrl-Shift-F Fit diagram into window Ctrl-F8 Toggle breakpoint Ctrl-K/Ctrl-Shift K Next/previous word match F8 Toggle Overview window Ctrl-Shift-F8 New breakpoint Alt-Left/Alt- Go backward/forward/to last Ctrl-Shift-5 Select active UML diagram Ctrl-Shift-F7 New watch Right/Ctrl-Q edit Highlights of NetBeans IDE 6.0 Keyboard Shortcuts & Code Templates When typing in the Source Editor, you can generate the ir import <jsp:setProperty name="|" text in the right-column of the following list by typing jsps le length property=""/> the abbreviation that is listed in the left-column and newo Object name = new Object(args); jspu <jsp:useBean id="I" type=""/> then pressing Tab. pe protected oup out.print("|") pr private oupl out.println("|") Java Editor Code Templates psf private static final pcg pageContext.getAttribute("|") En Enumeration psfb private static final boolean pageContext.getAttributeNamesInScope( pcgn Ex Exception psfi private static final int "|") Ob Object psfs private static final String pcgs pageContext.getAttributesScope("|") Psf public static final pst printStackTrace(); pcr pageContext.removeAttribute("|") Psfb public static final boolean psvm public static void main(String[] args){ pcs pageContext.setAttribute("|",) Psfi public static final int } pg <%@page |%> Psfs public static final String pu public pga <%@page autoFlush="false"%> St String re return pgb <%@page buffer="|kb"%> ab abstract serr System.err.println ("|"); pgc <%@page contentType="|"%> bo boolean sout System.out.println ("|"); pgerr <%@page errorPage="|"%> br break st static pgex <%@page extends="|"%> ca catch ( sw switch ( pgie <%@page isErrorPage="true"%> cl class sy synchronized pgim <%@page import="|"%> cn continue tds Thread.dumpStack(); pgin <%@page info="|"%> df default: th throws pgit <%@page isThreadSafe="false"%> dowhile do { trycatch try {} pgl <%@page language="java"%> } while (condition); catch (Exception e) {} pgs <%@page session="false"%> eq equals tw throw rg request.getParameter("|") ex extends twn throw new sg session.getAttribute("|") fa false wh while ( sp session.setAttribute("|", ) fi final whilei while (it.hasNext()) { sr session.removeAttribute("|") fl float Object elem = (Object) it.next(); tglb <%@taglib uri="|"%> forc for (Iterator it = collection.iterator(); } it.hasNext();) { To Change Default Settings: Object elem = (Object) it.next(); JSP Editor Code Templates 1. Choose Tools > Options from the main menu. } ag application.getAttribute("|") 2. For code templates, select Editor and click fore for (Object elem : iterable) { ap application.putAttribute("|",) the Code Templates tab. Here you can also } ar application.removeAttribute("|") change the expansion key, from Tab to fori for (int i = 0; i < arr.length; i++) { cfgi config.getInitParameter("|") something else. } jspf <jsp:forward page="|"/> 3. For keyboard shortcuts, select Keymap fy finally <jsp:getProperty name="|" jspg and choose a profile from the Profile drop- ie interface property="" /> down list. ifelse if (condition){}else { jspi <jsp:include page="|"/> } <jsp:plugin type="|" code="" Complete List of Keyboard Shortcuts: im implements jspp codebase=""></jsp:plugin> iof instanceof wiki.netbeans.org/wiki/view/KeymapProfileFor60