Fun with EMF

I used this tutorial to create a simple 1:n model in EMF:

I exported the model to a JAR file, which had manifest entries indicating I now had an OSGi bundle. I could simply use that JAR as a JAR in my NetBeans Platform application. However, I'd like an OSGi container to manage my bundle, i.e., make sure that the dependencies set in the manifest are satisfied.

Therefore, I created a NetBeans Platform application on top of Equinox, thanks to the sample application in NetBeans IDE 6.9, and then imported the bundle I had created above:

Notice that, above, you can see a warning message, indicating already at development time that I have dependency problems which will result in problems at runtime.

I spent some time trying to figure out which of the many OSGi/EMF/whatever bundles I'd need for this scenario, then gave up for the moment. (Anyone with an idea as to how to identify all the bundles I'll need, is welcome to tell me.)

However, it's possible to continue the development of the application, in the meantime, since I can set a dependency in my NetBeans modules on the OSGi bundle I imported:

Once I have the OSGi/EMF environment correctly set up, I'll learn from this and this article, and especially the sample by Gunnar (, about how to continue developing (and making maximum use) of EMF on the NetBeans Platform.


Pretty nice! Do you have any thoughts about EMF compared to Visual Library?

Posted by Eduardo Costa on June 07, 2010 at 12:41 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

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.


« May 2016