Tuesday, July 31, 2012

NETBEANS IDE 6/7 KEYBOARD SHORTCUTS & CODE TEMPLATES (WINDOWS)



KEYBOARD SHORT-CUTS  & CODE TEMPLATES FOR WINDOWS


The NetBeans IDE has seen one of the popular among IDE's over the past years, particularly with the adaptation of a completely smart,intelligent, slick Java/J2EE  along with different open source appliaction editor. Here are the Keyboard Short-Cuts, Hope that You will like for reference.....

Searching, Finding, and Replacing



KEYACTION                                 
Ctrl-F3 For Search word at insert point
Ctrl-F/H For Find/Replace in file
Ctrl-Shift-PTo Find/replace in projects
Ctrl-R For Rename
Ctrl-U, and SToggle case of selection
Ctrl-U, then LConverting the selection to lowercase
Ctrl-U, then UConverting the selection to uppercase
Alt-Shift-VFormatted Paste
Alt-F7Finding usages
Alt-Shift-UFind usages results
Alt-Shift-HTurning off searched result highlights
F3/Shift-F3Find next/previous in file













Opening and Toggling Between Different Views


KEYACTION
Alt-Shift-D Undocking window
Ctrl-Tab (Ctrl-`)Toggle between open documents
Ctrl-F4/Ctrl-WClose currently selected window
Ctrl-Shift-F4Close all windows
Shift-F10Open contextual menu
Shift-EscapeMaximizing window (toggle)





SOURCE CODE NEVIGATION


KEYACTION
Alt-OGo to source
Alt-Left/Alt-Right/Ctrl-QGo backward/forward/to last edit
Ctrl-[Move caret to matching bracket
Ctrl-Bmove to declaration
Ctrl-Gmove to line
Ctrl-Shift-1/2/3Select in Projects/Files/Favorites
Ctrl-K/Ctrl-Shift KNext/previous  match word
Ctrl-Shift-MToggling add/remove bookmarks
Ctrl-Shift-Period/CommaNext/previous bookmarks
Ctrl-Period/CommaNext/previous usage/compile error
Ctrl-O/Alt-Shift-OGo to type/file
Ctrl-Shift-TGo to JUnit test


COMPILING TESTING AND RUNNING


KEYACTION
Ctrl-F6/Alt-F6Run JUnit test on file/project
Ctrl-Shift-UCreate JUnit test
Ctrl-QSet request parameters
F9Compile package/ file
F11Build main project
F6/Shift-F6Run main project/file
Shift-F11Clean & build main project


DEBUGGING


KEYACTION
Ctrl-F5Start debugging main project
Ctrl-F7Step out
F7/F8Step into/over
Ctrl-Alt-UpGo to called method
Ctrl-Alt-DownGo to calling method
Ctrl-F8Toggle breakpoint
Ctrl-F9Evaluate expression
Ctrl-Shift-F7New watch
Ctrl-Shift-F8New breakpoint
Ctrl-Shift-F5Start debugging current file
Ctrl-Shift-F6Start debugging test for file (JUnit)
F4Run to cursor location in file
Shift-F5/F5Stop/Continue debugging session


JAVA CODING


KEYACTION
Alt-InsertGenerate code
Alt-Shift-IFix selected class’s import
Alt-Shift-FFormat selection
Alt-Shift Left/Right/Up/DownShift lines left/right/up/down
Ctrl-Shift-IFix all class imports
Ctrl/Alt-F12Inspect members/hierarchy
Ctrl-/Add/remove comment lines
Ctrl-EDelete current line
Ctrl-Shift-Up/DCopy lines up/down


RE-FACTORING


REFACTORING PROCESSDESCRIPTION

Change Method
Parameters


Enables you to add parameters to a method and change  the access  modifier.
Copy Class

Copies a class to the same or a different package.

Convert Anonymous
Class to Inner


Converts an anonymous class to an inner class that contains a name and constructor. The anonymous inner class is replaced with a call to the new inner class.
Extract Superclass

Creates a new abstract class, changes the current class to extend the new class, and moves the selected methods and fields to the new class.
Extract Interface

Creates a new interface from the selected public non-static methods in a class or
interface
Encapsulate Fields

Generates a getter method and and a setter method for a field and optionally updates all
referencing code to access the field using the getter and setter methods.

Introduce Variable,
Constant, Field, or
Method


Enables you to generate a statement based on the selected code and replace that block
of code with a call to the statement.
Move Class

Moves a class to another package or into another class. In addition, all source code in
your project is updated to reference the class in its new location
Move Inner to Outer LevelMoves an inner class one level up in hierarchy
Pull Up

Moves methods and fields to a class that their current class inherits from.
Push Down

Moves inner classes, methods, and fields to all subclasses of their current class.
Rename

Enables you to change the name of a class, variable, or method to something more
meaningful. In addition, it updates all source code in your project to reference the element
by its new name.
Safely Delete

Checks for references to a code element and then automatically deletes that element if no
other code references it.

Use Supertype Where
Possible


Changes code that references the selected class (or other type) to instead use a
supertype of that type.




JAVA EDITOR CODE TEMPLATES


KEYACTION
EnEnumeration
ExException
ObOBJECT
Psfpublic static final
Psfbpublic static final boolean
Psfipublic static final int
Psfspublic static final String 
StString
ababstract
boboolean 
brbreak
cacatch (
clclass
cncontinue
dfdefault:
dowhile

do {
} while (condition);
eqequals
exextends
fafalse
fifinal
flfloat
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++) {
}
fyfinally
ieinterface
ifelse

if (condition){ }else {
}
imimplements
iofinstanceof
irimport
lelength
newoObject name = new Object(args);
peprotected
prprivate
psfprivate static final
psfbprivate static final boolean
psfiprivate static final int
psfsprivate static final String
pstprintStackTrace();
psvm

public static void main(String[ ] args){
}
pupublic
rereturn
serrSystem.err.println ("|");
soutSystem.out.println ("|");
ststatic
swswitch (
sysynchronized
tdsThread.dumpStack();
ththrows
trycatch

try {}
catch (Exception e) {}
twthrow
twnthrow new
whwhile (
whileit

while (it.hasNext()) {
Object elem = (Object) it.next();
}







No comments:

Post a Comment