X

Geertjan's Blog

  • December 3, 2010

The Liberation of the NetBeans Platform from the NetBeans IDE

Geertjan Wielenga
Product Manager
This is the moment I've been waiting for, for a very long time:

Register default TopComponent location via annotations

Nov 30 '10; API spec. version: 6.37; affected top-level classes: TopComponent; made by: jtulach; issues: #191407

Use TopComponent.Registration, TopComponent.Description and TopComponent.OpenActionRegistration to register default location of a TopComponent, some of its properties and action to open it.

From: http://bits.netbeans.org/dev/javadoc/apichanges.html

It's a really big step, in my humble opinion. Now, when you use the New Window wizard in the IDE, you get this:

Above, there's no .settings file and no .wstcref file. There is one single class, with annotations.

At compile time, you end up with a generated layer.xml file, with content such as this:

Now, when I'm in IntelliJ IDEA, I can simply create a plain Java class, annotate it, and bob's your uncle... I have a new window in a NetBeans Platform application, with code completion to help me:

So, now that the Actions can be created via annotations, as well as the TopComponents, there's no real reason for not using any IDE at all. Start with a Maven archetype, open it into the IDE of your choice, use annotations, and create your rich-client applications without needing to worry about the fact that NetBeans IDE has wizards for these artifacts while your own IDE doesn't.

That's what I mean by the liberation of the NetBeans Platform from the NetBeans IDE. Now, for the first time, you have a real choice, from scratch. Sure, many developers have been figuring things out without NetBeans IDE for a long time, but now it is many times easier than before. Time to write a "hello world" NetBeans Platform tutorial for IntelliJ IDEA.

Join the discussion

Comments ( 2 )
  • Tushar Joshi Friday, December 3, 2010

    This is really a great news. Thanks for sharing, NetBeans never stops amazing me.

    with regards

    Tushar Joshi, Nagpur


  • Fred44000 Monday, December 13, 2010

    Hi Geertjan,

    i post you this message because no response on official netbeans platform user forum, can you ask me this ::

    -------------------------

    Hi

    I use the last netbeans dev platform with new actions annotation :

    Code:

    @ActionID(category="Window",id=CustomerTopComponent.PREFERRED_ID)

    @ActionReference(path="Menu/Window")

    @ActionRegistration(displayName="Clients")

    it's a great thing to out the layer.xml , very cool feature !!!

    In the netbeans crud tutorial, to enable Standart action and displaying in the toolbar, i have to modify layer.xml :

    Code:

    <folder name="Toolbars">

    <folder name="File">

    <file name="org-openide-actions-SaveAction.shadow">

    <attr name="originalFile" stringvalue="Actions/System/org-openide-actions-SaveAction.instance"/>

    <attr name="position" intvalue="444"/>

    </file>

    <file name="org-openide-actions-SaveAllAction.shadow_hidden"/>

    </folder>

    </folder>

    But now, how to do that with a generated layer.xml ?


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services