Saturday, November 25, 2006

Change your skin

If you love the default netbean's look and feel, but you are in windows, you can change it:

1. you must to edit the next file
/Applications/NetBeansIDE5.0Beta.app/Contents/Resources/NetBeans/etc/netbeans.conf

2. so that the line beginning netbeans_default_options includes the option:
--laf javax.swing.plaf.metal.MetalLookAndFeel

Tuesday, November 21, 2006

Quick Quick Quick ....

Quick, Quick, Quick develop in netbeans with macros
The sencond macro's name is IfNull:

Name: IfNull
Shortcut:ctrl + shift + i

code:
copy-to-clipboard caret-end-line caret-up start-new-line "if (" paste-from-clipboard " != null" caret-forward " {" caret-down caret-end-line insert-break "}" format

Notes: For use the "IfNull" macro you must select a variable and press ctrl+shift+i
Test it and post :P

Thursday, November 16, 2006

Netbeans Macros

For me, the best IDE for java programming is Netbeans because come with all in the box. You don't need to be search plugins to start. I like eclipse but i love netbeans, the editor is faster than eclipse.
I'm going to talk about macros to quick developing in netbeans ... what about it ?
Macros is the way to create your own editor in netbeans.
For example, if you wish to print a variable with a shortcut:

Tools/Editor/Macros/New

Name: prints
ShortCut: Ctrl+Shift+s
Macro code:
copy-to-clipboard caret-end-line insert-break "System.out.println(\"" paste-from-clipboard ": " caret-forward " + " paste-from-clipboard ");"

Example:

String macroHelloWorld = new String("macroHelloWorld");

type the code show above, then select the variable macroHelloWorld and press "Ctrl+Shift+s", so the next code will appear.

String macroHelloWorld = new String("macroHelloWorld");
System.out.println("macroHelloWorld: " + macroHelloWorld);

is there a way to make that in eclipse ?

Monday, November 13, 2006

Mr iberck appears again

After a few time i'm with you, i've a lot of new gadgets and tips for Programming, in special on NetbeansIDE, Java Tecnologies. In this week a will speak about macros in Netbans and how to use them to improve your code.