NetBeans Sources as a Platform
Posted
by Geertjan
on Oracle Blogs
See other posts from Oracle Blogs
or by Geertjan
Published on Sat, 26 Nov 2011 16:51:15 -0600
Indexed on
2011/11/27
1:56 UTC
Read the original article
Hit count: 434
/NetBeans IDE
By default, when you create a new NetBeans module, the 'development IDE' is the platform to which you'll be deploying your module. It's a good idea to create your own platform and check that into your own repo, so that everyone working on your project will be able to work with a standardized platform, rather than whatever happens to be beneath the development IDE your using.
Something else you can do is use the NetBeans sources as your platform, once you've checked them out. That's something I did the other day when trying to see whether adding 'setActivatedNodes' to NbSheet was sufficient for getting UndoRedo enabled in the Properties Window. So that's a good use case, i.e., you'd like to change the NetBeans Platform somehow, or you're fixing a bug, in other words, in some way you need to change the NetBeans Platform sources and then would like to try out the result of your changes as a client of your changes.
In that scenario, here's how to set up and use a NetBeans Platform from the NetBeans sources.
- Run 'ant build platform' on the root of the NetBeans sources. You'll end up with nbbuild/netbeans containing a subfolder 'platform' and a subfolder 'harness'. There's your NetBeans Platform.
- Go to Tools | NetBeans Platform and browse to nbbuild/netbeans', registering it as your NetBeans Platform.
- Create a new NetBeans module, using the new NetBeans Platform as the platform.
- Now the cool thing is you can open any of the NetBeans modules from the NetBeans Platform modules in the NetBeans sources. When you change the source code of one of these modules and then build that module, the changed JAR will automatically be added to the right place in the nbbuild/netbeans folder. And when you do a 'clean' on a NetBeans Platform module, the related JAR will be removed from nbbuild/netbeans.
© Oracle Blogs or respective owner