Replace/Override EFactory [message #421079] |
Wed, 23 July 2008 15:46 |
Eclipse User |
|
|
|
Originally posted by: swt.magellium.fr
Hello all !
I'd like to override the "create(EClass)" method of EFactoryImpl.
Is there a simple way to achieve that ?
For instance, I'd like to create my own EFactoryImpl class (subclass of
emf's EFactoryImpl) and to get all Factories to extend this class
instead of emf's EFactoryImpl when generating model code...
Thanks a lot in advance !
Stephane
|
|
|
Re: Replace/Override EFactory [message #421080 is a reply to message #421079] |
Wed, 23 July 2008 17:07 |
Eclipse User |
|
|
|
Originally posted by: swt.magellium.fr
I found that the "create(EClass)" method of EFactoryImpl seems to be
used only for dynamic EObjects, and that each subclasses (package
factories) redefines this "create" method in order to create non-dynamic
objects (I think there is a way to always create dynamic objects, but I
don't want dynamic objects...)
What I'd really like to do is to have a piece of code executed whenever
a model object is created...
SWT wrote :
> Hello all !
>
> I'd like to override the "create(EClass)" method of EFactoryImpl.
> Is there a simple way to achieve that ?
>
> For instance, I'd like to create my own EFactoryImpl class (subclass of
> emf's EFactoryImpl) and to get all Factories to extend this class
> instead of emf's EFactoryImpl when generating model code...
>
> Thanks a lot in advance !
> Stephane
|
|
|
|
Powered by
FUDForum. Page generated in 0.03092 seconds