Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Disable model property extension
Disable model property extension [message #1008490] Tue, 12 February 2013 17:36 Go to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
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


Re: Disable model property extension [message #1008504 is a reply to message #1008490] Tue, 12 February 2013 18:30 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Rui,

Hmm, it looks like this is a bug. All extension features should be "disabled" by default and should not appear in any Property Sheet Tab unless explicitly "enabled" in the plugin.xml. The code in TargetRuntime.java that you pointed out was just some test/debug code and should not be there - can you please create a bugzilla report for this?

If you want to write your own Property Tab to display this feature but still hide it in the Process tab, you'll need "disable" it in plugin.xml and then create an override for the isModelObjectEnabled(String,String) method from ListAndDetailCompositeBase.

Thanks for testing!
Bob
Re: Disable model property extension [message #1008505 is a reply to message #1008504] Tue, 12 February 2013 18:46 Go to previous message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Thanks Robert.
It's done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=400613

Greetings
Rui

Previous Topic:Example Custom Task screencast tutorial now available
Next Topic:Bind ComboObjectEditor to property extension
Goto Forum:
  


Current Time: Fri Apr 26 19:20:01 GMT 2024

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

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

Back to the top