Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[epsilon-dev] Concordance Model object creation

Hello Louis (and others),

As you might know I have some changes lines up for Concordance. Especially for 
the Model object.
My application uses the EMF EditingDomain to share the model between multiple 
tools. And I feel that concordance should use them as well, so by performing 
some changes to the Model class (and classes using the Model class), the 
EditingDomain implementation can be dynamically added to concordance.


First to add an interface describing all Model methods, named IModel. This is 
nothing spectacular. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=419001
BTW, I assume that IModel is a good enough name for the interface?


Next thing is to be able (as an user of Epsilon/Concordance) to provide a 
custom implementation of the Model interface.
Currently, I used an extension point to register my custom factory 
(implementing a new IModelFactory interface) which creates my custom 
implementation of IModel.

This works nicely and is least intrusive I think.
By default the ModelFactory implementation is used creating the 
default/current Model objects. So nothing changes for existing users.

But, (mis)using an extension point to 'configure' the ModelFactory seems wrong?
Instead a public static method could be called to register the factory, 
although this does not seem very nice as well and might result in the default 
factory being used until the call is made (which might also be the case using 
extension points...)

Any additional thoughts on this, or should I just commit my current 
implementation using the extension points?

Cheers,
  Maarten


Back to the top