Geertjan's Blog

  • January 27, 2006

Module Dependencies and Managing NetBeans Platforms

Geertjan Wielenga
Product Manager
I've now got Iván's Execution Profile module working for both NetBeans IDE 5.0 RC2 and for the post-5.0 development builds. So if you register my Update Center (which is here), you'll find the module here:

To get the module working for both 5.0 (or, at least, the RC2 release) and the post-5.0 dev builds, I played around a lot with the NetBeans Platform Manager (you can find it under the Tools menu):

If you use the NetBeans Platform Manager, you can use the features of the very latest dev builds while still making sure that the end result is compatible with an earlier version of the IDE. For example, every few days I get a new dev build, because I want to keep up with ongoing developments and play around with the latest stuff, such as the "Rename", "Move", "Copy" and "Delete", which is available for module projects in dev builds, but not in the 5.0 series. However, I want the plug-in modules that I end up with to be usable by people using 5.0 (but, I'm assuming everyone is on RC2, so am not going to test plug-in modules for earlier versions than that). So, to make this possible, I registered a different platform (which could be an IDE or the NetBeans Platform itself, which is just a subset of the IDE, or, better put, the NetBeans Platform is the basis of the IDE) in the NetBeans Platform Manager, and then used the "NetBeans Platform" drop-down list in my project's "Libraries" panel (in the Project Properties dialog box) to select it. Then, whenever I build the module project, it compiles against the modules that are in the selected platform. And, when compilation fails, I just remove and re-add a module in the Module Dependency list in the "Libraries" panel (doing this refreshes the project.xml file with the correct version of a module dependency). However, it would be nice (and much simpler) if I could just right-click the project.xml file and choose "Refresh". Maybe I'll create an RFE for that.

I fiddled around a bit, using the above strategy, and then somehow ended up with a version of Iván's module that works both in RC2 and the post-5.0 dev builds. I thought that was a bit odd. Maybe the module worked for both all along. Anyway, the module worked for me, both in my RC2 build and in a dev build that I downloaded yesterday. (It would be good if someone/s out there would try it out in their RC2 installation and would indicate whether it installs and works ok for them.)

This brings up another point—caveat emptor. The good thing about update centers is that the creator of plug-in modules can very easily make plug-in modules available to the world. The bad thing is that the user has no guarantee whatsoever that the module won't blow up the IDE and cause destruction and mayhem everywhere. That's why http://www.nbextras.org is a good deal. At least there you know that the plug-in module you're downloading has been through some sort of process—someone out there other than the creator of the plug-in module has not only tried it out, but found it non-destructive and even useful. But, while my plug-in modules are still in a very early test phase, and also while I'm putting samples together than aren't complete but that nonetheless demonstrate some intricate point, I'm going to continue making them available via my own update center. Once they're more mature (and useful), I'll contribute them to http://www.nbextras.org.

Finally, if you've been using someone's update center (such as the Beta or Dev Update Centers in the IDE, or my own update center, or Sandip's, or Masoud's, etc.), then here's a great opportunity to share your experiences and ensure that your issues and concerns are dealt with: Welcome to the AutoUpdate Survey. It won't take more than 5 minutes, but it might result in all your frustrations being resolved forever.

Join the discussion

Comments ( 5 )
  • Kovica Friday, January 27, 2006
    Cool :))))
  • Geertjan Friday, January 27, 2006
    What's cool, Kovica? :-)
  • Martin Krauskopf Friday, January 27, 2006
    > just right-click the project.xml file and choose "Refresh". Maybe I'll create an RFE for that.

    This problem is already known. Was discussed in details at dev@apisupport. Summarized in issue:


    Another relative issues:




    Feel free to add yourselve, you know... :) If Jesse will not implement the first mentioned for 5.0u1 maybe that 2nd or 3rd will be implemented.
  • Surya De Wednesday, February 1, 2006
    Does it work on the final release of NB 5?
  • Geertjan Wednesday, February 1, 2006
    Try it and see. I'm pretty sure it does.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.