Disable model property extension [message #1008490] |
Tue, 12 February 2013 12:36  |
Eclipse User |
|
|
|
Hi.
I was trying to add an extension property to process object, but I didnt want it to show up in Process Tab, so I tried to replace the default tab with my own, but turns out that "ListAndDetailComposite" gets ModelEnablements and thus, the property is shown anyway.
In order to get this working, I defined in modelenablement extension point that my property should be disabled.
"<disable object="Process" feature="sistema"/>"
In TargetRuntim#getAllRuntimes it gets my "disablement", however, in the end, there is a peace of code which enables it again:
/ All done parsing configuration elements
// now go back and fix up some things...
for (TargetRuntime rt : targetRuntimes) {
if (rt.modelDescriptor==null) {
rt.modelDescriptor = getDefaultRuntime().getModelDescriptor();
}
// add customTask and modelExtension features to modelEnablements
for (ModelEnablementDescriptor me : rt.getModelEnablements()) {
for (ModelExtensionDescriptor med : rt.getModelExtensions()) {
for (Property p : med.getProperties()) {
me.setEnabled(med.getType(), p.name, true);
EClassifier eClass = ModelUtil.getEClassifierFromString(med.getEPackage(), med.getType());
ModelUtil.createDynamicAttribute(med.getEPackage(), eClass, p.name, p.type);
}
}
I want my extended properties do not show up in process tab, because I want to show them in a separated tab.
How should I do this. Should I not define my property in plugin.xml? or the behaviuour I want is achieved by other means.
Thanks
Rui
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.13846 seconds