Thursday Jul 31, 2008

Groovy: Bridge Between Eclipse and NetBeans IDE?

If you're able to use a Groovy script to generate a NetBeans Platform application (as shown over the past few days in this blog), then why not go a step further and also generate two additional files—".project" and ".classpath", as shown below...

...because those two files happen to be all that's needed for an application to be an Eclipse project. You can then simply open the NetBeans Platform application right inside Eclipse:

And then you can use NetBeans IDE to generate various NetBeans API implementations, since Eclipse doesn't have the cool wizards that NetBeans IDE makes available for this purpose. After that, simply continue using Eclipse, if you're more comfortable with that editor or if one/more of your team mates use Eclipse while you prefer NetBeans.

By the way, I really like how an Eclispe project's classpath is declared in the above shown external ".classpath" file, because that means that I'm able to include as many NetBeans Platform JARs as I want in the process that generates the file. I.e., when the Eclipse project is opened in Eclipse, all the NetBeans Platform JARs (or as many/few as are set in the Groovy script) are on the Eclipse project's classpath.

Previously, I'd need Maven to achieve the result above. Now, via Groovy, I can generate an IDE-polyglot project in an easily customizable style and language. Thanks, Groovy, you're groovy.

About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« July 2008 »
SunMonTueWedThuFriSat
  
4
5
6
11
12
13
14
17
26
30
  
       
Today