Wednesday, February 19, 2014

Notes on NetBeans


Netbeans Shortcuts
https://netbeans.org/project_downloads/usersguide/shortcuts-74.pdf
http://wiki.netbeans.org/Keyboard_Shortcuts
Coding in Java
Ctrl-O/Alt-Shift-O Go to type/file
Alt+F7, check 'Find All Subtypes'

Ctrl-E Delete current line
Ctrl+Alt+B
Inspect Members Ctrl+F12
Inspect Members At Caret Ctrl+Shift+F12
Inspect Hierarchy Alt+F12
Inspect Hierarchy At Caret Alt+Shift+F12

Alt-Insert Generate code
Ctrl-Shift-I Fix all class imports
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-R Rectangular Selection (Toggle)
Ctrl-Shift-Up/D Copy lines up/down 
Ctrl/Alt-F12 Inspect members/hierarchy
Ctrl-/ Add/remove comment lines 
Ctrl-E Delete current line
ALT+F7 Find Usages
CTRL+F4 Close Editor Window and CTRL+SHIFT+F4 Close All Editor Windows
CTRL+F12 Navigate to Member
SHIFT+ESC Toggle Editor Maximize / Minimize

Remote debug in Netbeans
http://wiki.netbeans.org/FaqDebuggingRemote
From the main menu, select Debug > Attach Debugger
Make sure that JPDA Debugger is selected in the combo-box.
Select the appropriate connection type (with respect to the value of the " transport " sub-option).
Enter values of other options:
If you use " dt_socket " transport:
Enter the hostname of computer where the debugged application is running (can be "localhost" if it is on the same computer) into the Host field.
Enter the selected port number into the Port field.
If you use " dt_shmem " tranport (only for MS Windows):
Enter the shared memory name (e.g. "myapp").

Netbeans: Run Junit test and Run focused test method
https://blogs.oracle.com/netbeansphp/entry/run_debug_focused_test_method
http://oopbook.com/junit-testing/junit-testing-in-netbeans/



No comments:

Post a Comment