Hi Kim
Does the "autocreated" attribute & feature described at
http://wiki.eclipse.org/JWT_Metamodel_Extension#Additional_features
meet your needs ?
...
OK, I got what you mean. Good question.
I guess the best way is to do it programmatically : if you don't
already have one, create your own "New workflow" action that extends
JWT's, and see in
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jwt/we/jwt-we-conf-model.edit/src/org/eclipse/jwt/we/conf/edit/ui/ManageActivatedProfilesUI.java?view=markup&root=Technology_Project
how to write code that
* create a _conf file for a model that had none : ex.
see enableProfileButton.addListener(SWT.Selection,... =>
ConfModel newlyLoadedConfModel = ConfModelResourceManager.INSTANCE.loadConfModelOfModel(selectedModel, true);
* the profile you want to activate on all models has to be
"installed" in your JWT install (best way is to have a plugin with the
right .conf and extensions in its plugin.xml)
* then "activate" this installed profile so it'll be copied in your
model's _conf file : ex.
see activateInstalledProfileAction =>
AspectManager.INSTANCE.activateProfile(getSelectedModel(), installedProfile);
And it should be OK !
And how to activate a profile on all existing workflows ?
Same idea : customize the "Open" action with code that
* "activates" your installed profile so it'll be copied in your
model's _conf file : ex. see "activateInstalledProfileAction" :
AspectManager.INSTANCE.activateProfile(getSelectedModel(),
installedProfile);
& I've added it to the wiki.
Hope it'll help !
Regards,
Marc
Kim Nguyen a écrit :
Hi
Marc,
I have a question about extension with aspect.
I tried to extend an element with new attributes. So I defined EMF
model which extends AspectInstance. All work well, but if I want to use
new attributes, so I always have to activate the installed profile on
every open workflow (installed profiles (right click to enable)...)
After then is the new attributes active for the element.
Is it possible to config, that the profile always load without
activating profile from user?
Thank you in advance.
Best regards,
Kim
|