« červen 2005 »
PoÚtStČtSoNe
  
   
       
Today

Navigation

Speaker Profile
Roumen's Weblog
Login
Sun Bloggers
Technorati Profile

Am I popular?

Today's Page Hits: 1317

Contacts

Name: Roman Strobl
E-mail: roman dot strobl
at sun dot com

NetBeans

Java Sites

Javalobby
The Server Side
Java Tips
Java Blogs
java.net
java.sun.com
java.cz

Blogs

NetBeans:
Geertjan
Brian Leonard
Gregg Sporar
Lukas Hasik
Ludovic Champenois
Vincent Brabant
Alexis Moussine-Pouchkine
Jullion-Ceccarelli
Tom Ball
Tim Boudreau
Jesse Glick
Petr Blaha
Ruth Kusterer
Jara Uhrik
xzajo
Jan Lahoda
James Branam
nbextras.org

Sun:
Kazem - bug cartoons ;-)
Tor Norbye
Romain Guy
James Gosling
Chief Gaming Officer
Bill Vass
Jim Grisanzio
Jonathan Schwartz

Planets:
Planet Netbeans
Planet Sun
Planet Eclipse

Other:
netbeans-blog.org
Joel Spolsky
Bruce Eckel

License info

Creative Commons License
This work is licensed under a Creative Commons License.

Recent Entries

Map of visits

Locations of visitors to this page
« Previous day (Jun 14, 2005) | Main | Next day (Jun 15, 2005) »
20050615 Středa červen 15, 2005
New NetBeans Icon - Borgs Are Coming

NetBeans has a new desktop icon:



I can't help myself but I like the older one more. Maybe it's a matter of getting used to it. Concerning icons and stuff, everyone's suddenly a UI expert... It really looks like the Star Trek Borg cube.
First Q-Build of NetBeans.next

... was surprisingly not promoted. This was a long day today, I've submitted 10 bugs. And in meanwhile, I'm preparing the demos for the NetBeans day. I've just counted it and in the first demo we'll show 15 less known but useful features of NetBeans 4.1 editor, well, maybe known by the NB enthusiasts but hidden for the average Joe developers. Maybe we'll surprise the enthusiasts, too.
Quick Tip #7 - Macros in Editor

As promised, today's tip is about macros. What are they? These are actions which are recorded according to what you do in the editor. Depending how good you are, you can create even such action such as surround with try-catch, comment a piece of code, etc.

You can record the macros by pressing the red button in editor toolbar, perform the actions and then end recording by pressing the grey square next to the button. Then you name the macro and assign a shorcut to it. To execute the macro, you just need to press the shortcut you've assigned.

Michel Graciano from Brazil has prepared some great macros and you can download them here. Similarly to abbreviations the content of the zip should be placed into the directory ~/.netbeans/4.1/config/Editors/text/x-java. Make sure to backup all XML files this may replace. The abbreviations in abbreviations.xml are necessary to execute the macros (they contain few more than last time), the keybindings.xml file sets the shortcuts. Macros.xml file contains macros recorded by Michel.

Here are the available macros:

ShortcutAction
Ctrl-J ISurround with if()
Ctrl-J TSurround with try-catch
Ctrl-J LAdd debug code
Ctrl-N PCreate property
Ctrl-J {Add a block
Ctrl-J HComment code
Ctrl-N FDefine identifier by previous class
Ctrl-N SDelete two words
Ctrl-J CTrim
Alt-U QToggle case of identifier
Ctrl-J [Format code
Ctrl-J DDebug variable
Ctrl-J FAdd editor fold


Most of these macros require to have selected a piece of code in the clipboard. You may not use all of these, but they're a good source of inspiration for creating your own macros. Actually this way you can add simple features to your IDE. How cool is that? :-)


    Disclaimer: The contents of my blog represent my personal opinions which may differ from official views of my employer, Sun Microsystems.