Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » Extension Point Modeling Framework(Using EMF to make extension point development a lot easier?)
Extension Point Modeling Framework [message #772527] Fri, 30 December 2011 01:17
Duncan Krebs is currently offline Duncan KrebsFriend
Messages: 31
Registered: June 2011
Location: Bay Area / Mexico

I've been developing in eclipse for some time and a few years ago I wrote a component that if you know of the apache commons digester component you write a set of rules based on xml schema for object instantiation property setting and setter calling (like a stack and when this <person> element is reached created a Person object, set properties like name and on </Person> pop it from the stack and call addPerson to the parent object.

So using that approach for all the extension points I have I write a set of rules based on the extension point xsd so that I then have a ExtensionRegistry with all POJO objects that model the extension points which is a lot easier than going through the hard to use and tedious extension API. I also have a special rule that will set the contributor plugin so I know what bundle contributed a specific extension.

It would be nice if we could create a tool that looks at the extension points in a plugin and then does code generation to create a "ExtensionRegistry" class and "ExtensionRegistryProcessor" where the processor gets called at plugin activation and for each extension point a POJO bean is created and in the extension registry object you can then say like getActionSets() or getViews() or whatever your extension points are instead of having to go through the Eclipse ExtensionPoint API. In runtime there would be no additional dependencies other than maybe common beanutils and the ide feature would work something like this.. create an extension point for example clockListeners and a clockListener element that has an id attribute and a class attribute that implements IClockListener, then in the tool kind of like of EMF there is a object model that is auto generated from looking at al the extension points then a generate code action that syncronizes your ExtensionRegistry with the current extension points you have defined.

Then this way, to create an extension point you simply define it in the editor. run the code generation tool and have a reference to the registry on the plugin activator to say registry.getClockListeners().

Free time is something I don't have much of, but I'm getting tired of having to create the bean and rules manually and am wondering if people think this could be a useful approach or see any potential flaws. Would be also nice to use EMF and create an EMF ecore based on the extension points for the plugin but that would be an additional emf dependency that some RCP apps would not want but would make development faster. Call it something like Extension point modeling framework or Extension Cruncher
- Duncan Krebs

Previous Topic:[ECore] How to reference fixed Ecore classes as well as model instances
Next Topic: UI Acceleo Launcher Project fails
Goto Forum:

Current Time: Wed Dec 02 04:40:35 GMT 2020

Powered by FUDForum. Page generated in 0.01499 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top