0% found this document useful (0 votes)
641 views2 pages

NetBeans IDE 6.5 Keyboard Shortcuts and Code Templates

The document provides code snippets and keyboard shortcuts for the NetBeans IDE. Some key points: - Keyboard shortcuts for common tasks like compiling, running, debugging, navigating code, and searching/replacing. - Code templates that can be generated by typing abbreviations then pressing tab to insert boilerplate code like classes, exceptions, get/set methods. - JSP tags and directives that can be inserted using code templates like taglibs, page directives, include/plugin tags.

Uploaded by

hssaroch
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
641 views2 pages

NetBeans IDE 6.5 Keyboard Shortcuts and Code Templates

The document provides code snippets and keyboard shortcuts for the NetBeans IDE. Some key points: - Keyboard shortcuts for common tasks like compiling, running, debugging, navigating code, and searching/replacing. - Code templates that can be generated by typing abbreviations then pressing tab to insert boilerplate code like classes, exceptions, get/set methods. - JSP tags and directives that can be inserted using code templates like taglibs, page directives, include/plugin tags.

Uploaded by

hssaroch
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Highlights of NetBeans IDE 6.

5 Keyboard Shortcuts & Code Templates


Finding, Searching, and Replacing Compiling, Testing, and Running
Coding in Java
Ctrl-F3 Search word at insert point F9 Compile package/ file
F3/Shift-F3 Find next/previous in file Alt-Insert Generate code F11 Build main project
Ctrl-F/H Find/Replace in file Ctrl-Shift-I Fix all class imports Shift-F11 Clean & build main project
Alt-F7 Find usages Alt-Shift-I Fix selected class's import Ctrl-Q Set request parameters
Ctrl-Shift-F/H Find/replace in projects Alt-Shift-F Format selection Ctrl-Shift-U Create JUnit test
Alt-Shift-U Find usages results Alt-Shift Left/ Shift lines left/right/up/down Ctrl-F6/Alt-F6 Run JUnit test on file/project
Alt-Shift-H Turn off search result highlights Right/Up/Down F6/Shift-F6 Run main project/file
Ctrl-R Rename Ctrl-Shift-Up/D Copy lines up/down
Ctrl/Alt-F12 Inspect members/hierarchy Opening and Toggling between Views
Ctrl-U, then U Convert selection to uppercase
Ctrl-U, then L Convert selection to lowercase Ctrl-/ Add/remove comment lines
Ctrl-Tab (Ctrl-`) Toggle between open documents
Ctrl-U, then S Toggle case of selection Ctrl-E Delete current line
Shift-Escape Maximize window (toggle)
Ctrl-Shift-V Paste formatted Coding in C/C++ Ctrl-F4/Ctrl-W Close currently selected window
Ctrl-I Jump to quick search field Ctrl-Shift-F4 Close all windows
Alt-Shift-C Go to declaration Shift-F10 Open contextual menu
Navigating through Source Code Ctrl-F9 Evaluate expression Alt-Shift-D Undock window
Ctrl-O/Alt-Shift-O Go to type/file Coding in Ruby Debugging
Ctrl-Shift-T Go to JUnit test
Alt-O Go to source Ctrl-Shift-A Jump Rails action > view Ctrl-F5 Start debugging main project
Ctrl-B Go to declaration Alt-Shift- Select Next/Previous element Ctrl-Shift-F5 Start debugging current file
Ctrl-G Go to line Period/Comma Ctrl-Shift-F6 Start debugging test for file
Ctrl-Shift-M Toggle add/remove bookmark Ctrl-Shift-Space Show documentation (JUnit)
Ctrl-Shift- Next/previous bookmark Ctrl-Shift-T Jump from test file to file Shift-F5/F5 Stop/Continue debugging session
Period/Comma SOA F4 Run to cursor location in file
Ctrl-Period/Comma Next/previous usage/compile F7/F8 Step into/over
error Tab-Shift-Arrows Move through elements Ctrl-F7 Step out
Ctrl-Shift-1/2/3 Select in Projects/Files/Favorites Alt-Shift-F Advanced search Ctrl-Alt-Up Go to called method
Ctrl-[ Move caret to matching bracket Alt/Shift-Enter Expand/collapse elements Ctrl-Alt-Down Go to calling method
Ctrl-K/Ctrl-Shift K Next/previous word match Ctrl-Shift-F9 Show BPEL Mapper Ctrl-F9 Evaluate expression
Alt-Left/Alt-Right/ Go backward/forward/to last UML Ctrl-F8 Toggle breakpoint
Ctrl-Q edit Ctrl-Shift-F8 New breakpoint
Alt Up/Down Next/previous marked Alt-Shift-A/M Insert attribute/operation into Ctrl-Shift-F7 New watch
occurrence selected element
Ctrl-Shift-F Fit diagram into window
Ctrl-7 Open Navigator window
Ctrl-Shift-5 Select active diagram & element
Highlights of NetBeans IDE 6.5 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 the iof instanceof <jsp:plugin type="|" code=""
jspp
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="" /> http://wiki.netbeans.org/KeymapProfileFor60

You might also like