NetBeans has a helpful (to me anyway!) feature under the "Views" menu, called "Synchronize Editor with Views". As the name suggests, toggling this on will cause the navigator view to jump straight to a file when it's opened in the editor.
I generally prefer this to the normal "Ctrl+Shift+1" shortcut for manually jumping to a file. However, the downside is that after editing several files, your navigator tree is a mess of multiple open directories.
Eclipse has similar functionality, but it also has a "collapse all" button at the top of its navigator view... restoring things with a single click having to scroll around. Does NetBeans have any similar mechanism for collapsing open directories? Maybe a poorly-documented keyboard shortcut buried in there or something?
As shown in the servlet example and as described in Custom Code Folding in NetBeans, one can add custom code folding in NetBeans simply be enclosing the code to be folded within // <editor-fold> and // </editor-fold> comments.
Taken from http://ui.netbeans.org/docs/ui/code_folding/cf_uispec.html
Collapse Fold Ctrl+Minus
Expand Fold Ctrl+Plus
Collapse All Folds Ctrl+Shift+Minus
Expand All Folds Ctrl+Shift+Plus
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With