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
| KEY | ACTION |
|---|---|
| Ctrl-F3 | For Search word at insert point |
| Ctrl-F/H | For Find/Replace in file |
| Ctrl-Shift-P | To Find/replace in projects |
| Ctrl-R | For Rename |
| Ctrl-U, and S | Toggle case of selection |
| Ctrl-U, then L | Converting the selection to lowercase |
| Ctrl-U, then U | Converting the selection to uppercase |
| Alt-Shift-V | Formatted Paste |
| Alt-F7 | Finding usages |
| Alt-Shift-U | Find usages results |
| Alt-Shift-H | Turning off searched result highlights |
| F3/Shift-F3 | Find next/previous in file |
Opening and Toggling Between Different Views
| KEY | ACTION |
|---|---|
| Alt-Shift-D | Undocking window |
| Ctrl-Tab (Ctrl-`) | Toggle between open documents |
| Ctrl-F4/Ctrl-W | Close currently selected window |
| Ctrl-Shift-F4 | Close all windows |
| Shift-F10 | Open contextual menu |
| Shift-Escape | Maximizing window (toggle) |
SOURCE CODE NEVIGATION
| KEY | ACTION |
|---|---|
| Alt-O | Go to source |
| Alt-Left/Alt-Right/Ctrl-Q | Go backward/forward/to last edit |
| Ctrl-[ | Move caret to matching bracket |
| Ctrl-B | move to declaration |
| Ctrl-G | move to line |
| Ctrl-Shift-1/2/3 | Select in Projects/Files/Favorites |
| Ctrl-K/Ctrl-Shift K | Next/previous match word |
| Ctrl-Shift-M | Toggling add/remove bookmarks |
| Ctrl-Shift-Period/Comma | Next/previous bookmarks |
| Ctrl-Period/Comma | Next/previous usage/compile error |
| Ctrl-O/Alt-Shift-O | Go to type/file |
| Ctrl-Shift-T | Go to JUnit test |
COMPILING TESTING AND RUNNING
| KEY | ACTION |
|---|---|
| Ctrl-F6/Alt-F6 | Run JUnit test on file/project |
| Ctrl-Shift-U | Create JUnit test |
| Ctrl-Q | Set request parameters |
| F9 | Compile package/ file |
| F11 | Build main project |
| F6/Shift-F6 | Run main project/file |
| Shift-F11 | Clean & build main project |
DEBUGGING
| KEY | ACTION |
|---|---|
| Ctrl-F5 | Start debugging main project |
| Ctrl-F7 | Step out |
| F7/F8 | Step into/over |
| Ctrl-Alt-Up | Go to called method |
| Ctrl-Alt-Down | Go to calling method |
| Ctrl-F8 | Toggle breakpoint |
| Ctrl-F9 | Evaluate expression |
| Ctrl-Shift-F7 | New watch |
| Ctrl-Shift-F8 | New breakpoint |
| Ctrl-Shift-F5 | Start debugging current file |
| Ctrl-Shift-F6 | Start debugging test for file (JUnit) |
| F4 | Run to cursor location in file |
| Shift-F5/F5 | Stop/Continue debugging session |
JAVA CODING
| KEY | ACTION |
|---|---|
| Alt-Insert | Generate code |
| Alt-Shift-I | Fix selected class’s import |
| Alt-Shift-F | Format selection |
| Alt-Shift Left/Right/Up/Down | Shift lines left/right/up/down |
| Ctrl-Shift-I | Fix all class imports |
| Ctrl/Alt-F12 | Inspect members/hierarchy |
| Ctrl-/ | Add/remove comment lines |
| Ctrl-E | Delete current line |
| Ctrl-Shift-Up/D | Copy lines up/down |
RE-FACTORING
| REFACTORING PROCESS | DESCRIPTION |
|---|---|
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 Level | Moves 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
| KEY | ACTION |
|---|---|
| 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 ( |
| whileit | while (it.hasNext()) { Object elem = (Object) it.next(); } |
No comments:
Post a Comment