Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Brodt2014-07-02 16:20:44 -0400
committerBob Brodt2014-07-02 16:20:44 -0400
commitc33c69a4e67e6b8d7fed93e6779321ee3799604d (patch)
treebd700ca3d4f78501c6a1a0e762ae53c598027ad7
parent032e0cbdb4f6c61b438de6d071cc057e246c5c50 (diff)
downloadorg.eclipse.bpmn2-modeler-c33c69a4e67e6b8d7fed93e6779321ee3799604d.tar.gz
org.eclipse.bpmn2-modeler-c33c69a4e67e6b8d7fed93e6779321ee3799604d.tar.xz
org.eclipse.bpmn2-modeler-c33c69a4e67e6b8d7fed93e6779321ee3799604d.zip
Fix examples, various NPEs.
Bug 435763 - IReconnectionFeature don't work whit custom links. Added code to disable validation during file loading to avoid txn rollback. Fix activations for Property Tabs
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleMitigationTaskPropertySection.java2
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRiskTaskPropertySection.java2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomElementFeatureContainer.java5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java15
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java9
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java15
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java44
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java53
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties39
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml51
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmEmptyPropertySection.java50
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties119
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/plugin.xml154
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java7
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java9
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMN2FeatureProvider.java19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java38
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java31
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java18
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/CollaborationDiagramPropertySection.java50
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java17
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java9
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java21
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java13
45 files changed, 447 insertions, 500 deletions
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleMitigationTaskPropertySection.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleMitigationTaskPropertySection.java
index ad4f6818..c07036ee 100644
--- a/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleMitigationTaskPropertySection.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleMitigationTaskPropertySection.java
@@ -58,7 +58,7 @@ public class SampleMitigationTaskPropertySection extends DefaultPropertySection
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
if (super.appliesTo(part, selection)) {
- EObject eObj = this.getBusinessObjectForSelection(selection);
+ EObject eObj = getBusinessObjectForSelection(selection);
if (eObj instanceof TextAnnotation) {
EStructuralFeature f = ModelDecorator.getAnyAttribute(eObj, "benefit");
return f!=null;
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRiskTaskPropertySection.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRiskTaskPropertySection.java
index d7b85237..7591fb50 100644
--- a/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRiskTaskPropertySection.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRiskTaskPropertySection.java
@@ -57,7 +57,7 @@ public class SampleRiskTaskPropertySection extends DefaultPropertySection {
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
if (super.appliesTo(part, selection)) {
- EObject eObj = this.getBusinessObjectForSelection(selection);
+ EObject eObj = getBusinessObjectForSelection(selection);
if (eObj instanceof TextAnnotation) {
EStructuralFeature f = ModelDecorator.getAnyAttribute(eObj, "cost");
return f!=null;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java
index 822d37af..54d55f37 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java
@@ -373,9 +373,12 @@ public class DIUtils {
// create a new one
IDiagramTypeProvider dtp = editor.getDiagramContainer().getDiagramTypeProvider();
+ final Resource resource = dtp.getDiagram().eResource() != null ?
+ dtp.getDiagram().eResource() :
+ editor.getEditingDomain().getResourceSet().getResources().get(0);
+
final Diagram newDiagram = createDiagram(bpmnDiagram.getName());
final IFeatureProvider featureProvider = dtp.getFeatureProvider();
- final Resource resource = dtp.getDiagram().eResource();
TransactionalEditingDomain domain = editor.getEditingDomain();
domain.getCommandStack().execute(new RecordingCommand(domain) {
protected void doExecute() {
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomElementFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomElementFeatureContainer.java
index b58fc659..3ecaa202 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomElementFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomElementFeatureContainer.java
@@ -32,6 +32,7 @@ import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.ICustomContext;
import org.eclipse.graphiti.features.context.IPictogramElementContext;
+import org.eclipse.graphiti.features.context.IReconnectionContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.algorithms.Image;
@@ -196,6 +197,10 @@ public class CustomElementFeatureContainer implements ICustomElementFeatureConta
break;
}
}
+ else if (context instanceof IReconnectionContext) {
+ PictogramElement pe = ((IReconnectionContext) context).getConnection();
+ id = Graphiti.getPeService().getPropertyValue(pe,GraphitiConstants.CUSTOM_ELEMENT_ID);
+ }
else {
id = context.getProperty(GraphitiConstants.CUSTOM_ELEMENT_ID);
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java
index 2fcc122f..368ae2c3 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.EndEvent;
import org.eclipse.bpmn2.EventDefinition;
import org.eclipse.bpmn2.MessageEventDefinition;
+import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.modeler.core.di.DIImport;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
@@ -39,7 +40,6 @@ import org.eclipse.graphiti.mm.pictograms.FixPointAnchor;
import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IPeService;
public abstract class AbstractAddFlowFeature<T extends BaseElement>
extends AbstractBpmn2AddFeature<T> {
@@ -56,19 +56,6 @@ public abstract class AbstractAddFlowFeature<T extends BaseElement>
public boolean canAdd(IAddContext context) {
if (context instanceof IAddConnectionContext) {
IAddConnectionContext acc = (IAddConnectionContext) context;
- if (acc.getSourceAnchor() != null) {
- Object obj = BusinessObjectUtil.getFirstElementOfType(
- acc.getSourceAnchor().getParent(), BaseElement.class);
- if (obj instanceof EndEvent) {
- List<EventDefinition> eventDefinitions = ((EndEvent) obj).getEventDefinitions();
- for (EventDefinition eventDefinition : eventDefinitions) {
- if (eventDefinition instanceof MessageEventDefinition) {
- return true;
- }
- }
- return false;
- }
- }
return getBusinessObjectType().isAssignableFrom(getBusinessObject(context).getClass());
}
return false;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java
index f4216db9..2f41648c 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java
@@ -12,15 +12,21 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features.flow;
+import java.util.List;
+
import org.eclipse.bpmn2.Association;
import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.ChoreographyTask;
import org.eclipse.bpmn2.Collaboration;
import org.eclipse.bpmn2.Conversation;
import org.eclipse.bpmn2.ConversationLink;
import org.eclipse.bpmn2.ConversationNode;
import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.EndEvent;
+import org.eclipse.bpmn2.EventDefinition;
import org.eclipse.bpmn2.FlowElementsContainer;
+import org.eclipse.bpmn2.MessageEventDefinition;
import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java
index 9f93fbbc..e307941d 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java
@@ -257,6 +257,9 @@ public abstract class AbstractBpmn2PropertySection extends GFPropertySection imp
/* (non-Javadoc)
* Override this to allow the section to decide whether or not it will be rendered.
+ * Subclasses MUST call this method because it sets the DiagramEditor as a side effect
+ * and checks if the selected business object is enabled in the Tool Profile.
+ *
* @see org.eclipse.bpmn2.modeler.core.runtime.IBpmn2PropertySection#appliesTo(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
@Override
@@ -268,9 +271,11 @@ public abstract class AbstractBpmn2PropertySection extends GFPropertySection imp
part = v.getContributingPart();
}
editor = (DiagramEditor)part.getAdapter(DiagramEditor.class);
-
+
if (editor!=null) {
- return true;
+ EObject be = getBusinessObjectForSelection(selection);
+ if (be!=null)
+ return isModelObjectEnabled(be);
}
return false;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java
index f8ce37b4..361a003c 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java
@@ -528,7 +528,14 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
String displayName = getBusinessObjectDelegate().getLabel(object, reference);
ObjectEditor editor = null;
- if (getBusinessObjectDelegate().isContainmentFeature(object, reference)) {
+ if (getBusinessObjectDelegate().isMultiChoice(object, reference)) {
+ if (reference.isMany()) {
+ editor = new FeatureListObjectEditor(this,object,reference);
+ } else {
+ editor = new ComboObjectEditor(this,object,reference);
+ }
+ }
+ else if (getBusinessObjectDelegate().isContainmentFeature(object, reference)) {
EClass eClass = (EClass) reference.getEType();
// FIXME: how do we deal with lists of these things?
Object v = getBusinessObjectDelegate().getValue(object,reference);
@@ -541,13 +548,6 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
detailComposite.setBusinessObject(value);
detailComposite.setTitle(getBusinessObjectDelegate().getLabel(value));
}
- else if (getBusinessObjectDelegate().isMultiChoice(object, reference)) {
- if (reference.isMany()) {
- editor = new FeatureListObjectEditor(this,object,reference);
- } else {
- editor = new ComboObjectEditor(this,object,reference);
- }
- }
else if (getBusinessObjectDelegate().canCreateNew(object, reference)) {
editor = new ReadonlyTextObjectEditor(this,object,reference);
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java
index f8a0baa4..9a0e8bcb 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java
@@ -154,10 +154,11 @@ public class DefaultDetailComposite extends AbstractDetailComposite {
feature = getFeature((EObject)o,featureName);
composite = bindProperty((EObject)o, property);
if (composite instanceof AbstractListComposite) {
+ EClass listItemClass = ((AbstractListComposite)composite).getDefaultListItemClass((EObject)o, feature);
((AbstractListComposite)composite).setTitle(
NLS.bind(
Messages.DefaultDetailComposite_List_Title,
- getBusinessObjectDelegate().getLabel((EObject)o,feature),
+ getBusinessObjectDelegate().getLabel(listItemClass),
ModelUtil.toCanonicalString((EObject)o)
)
);
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java
index 0d332308..d38aa321 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java
@@ -15,6 +15,7 @@ package org.eclipse.bpmn2.modeler.core.merrimac.clad;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
@@ -81,6 +82,9 @@ public class DefaultPropertySection extends AbstractBpmn2PropertySection {
propertiesProvider.setProperties(properties);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection#appliesTo(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
if (super.appliesTo(part, selection)) {
@@ -105,9 +109,7 @@ public class DefaultPropertySection extends AbstractBpmn2PropertySection {
}
}
}
- EObject eObj = BusinessObjectUtil.getBusinessObjectForSelection(selection);
- if (eObj!=null)
- return appliesTo(eObj);
+ return appliesTo(getBusinessObjectForSelection(selection));
}
return false;
}
@@ -127,6 +129,11 @@ public class DefaultPropertySection extends AbstractBpmn2PropertySection {
}
public EObject getBusinessObjectForSelection(ISelection selection) {
- return BusinessObjectUtil.getBusinessObjectForSelection(selection);
+ EObject bo = BusinessObjectUtil.getBusinessObjectForSelection(selection);
+ if (bo instanceof BPMNDiagram) {
+ if (((BPMNDiagram)bo).getPlane()!=null && ((BPMNDiagram)bo).getPlane().getBpmnElement()!=null)
+ return ((BPMNDiagram)bo).getPlane().getBpmnElement();
+ }
+ return bo;
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java
index 9c147208..eaea7b78 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java
@@ -763,7 +763,8 @@ public class ShapeStyle extends BaseRuntimeExtensionDescriptor {
EStructuralFeature styleFeature = md.getEStructuralFeature(element, STYLE_OBJECT);
if (styleFeature!=null) {
ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(element);
- style = (EObject)adapter.getFeatureDescriptor(styleFeature).getValue();
+ if (adapter!=null)
+ style = (EObject)adapter.getFeatureDescriptor(styleFeature).getValue();
}
}
catch (Exception e) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java
index 65601327..3a41c653 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java
@@ -15,6 +15,7 @@ package org.eclipse.bpmn2.modeler.core.runtime;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
@@ -30,7 +31,6 @@ import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.jface.viewers.IFilter;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
import org.eclipse.ui.views.properties.tabbed.AbstractSectionDescriptor;
import org.eclipse.ui.views.properties.tabbed.ISection;
@@ -38,7 +38,7 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
protected String id;
protected String tab;
- protected AbstractPropertySection sectionClass;
+ protected AbstractBpmn2PropertySection sectionClass;
protected List<Class> appliesToClasses = new ArrayList<Class>();
protected String enablesFor;
protected String filterClassName;
@@ -68,7 +68,7 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
sectionClass = null;
}
else {
- sectionClass = (AbstractPropertySection) e.createExecutableExtension("class"); //$NON-NLS-1$
+ sectionClass = (AbstractBpmn2PropertySection) e.createExecutableExtension("class"); //$NON-NLS-1$
}
filterClassName = e.getAttribute("filter"); //$NON-NLS-1$
if (filterClassName==null || filterClassName.isEmpty())
@@ -142,8 +142,10 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
- if (sectionClass==null)
+ if (sectionClass==null) {
+ // this was defined as "empty" in the plugin, which means we should hide this tab.
return false;
+ }
EObject businessObject = null;
PictogramElement pe = BusinessObjectUtil.getPictogramElementForSelection(selection);
@@ -161,7 +163,9 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
else {
businessObject = BusinessObjectUtil.getBusinessObjectForSelection(selection);
}
-
+ if (businessObject==null)
+ return false;
+
DiagramEditor editor = ModelUtil.getDiagramEditor(businessObject);
if (editor!=null) {
TargetRuntime rt = (TargetRuntime) editor.getAdapter(TargetRuntime.class);
@@ -191,34 +195,8 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
}
}
- // should we delegate to the section to determine whether it should be included in this tab?
- if (sectionClass instanceof IBpmn2PropertySection) {
- if (businessObject==null)
- return false;
- return ((IBpmn2PropertySection)sectionClass).appliesTo(part, selection);
- }
-
- // if an input description was specified, check if the selected business object is of this description.
- if (appliesToClasses.isEmpty()) {
- return true;
- }
-
- // check all linked BusinessObjects for a match
- if (pe!=null) {
- if (pe.getLink()!=null) {
- for (EObject eObj : pe.getLink().getBusinessObjects()){
- if (appliesTo(eObj)) {
- return true;
- }
- }
- }
- }
- if (businessObject!=null) {
- if (appliesTo(businessObject)) {
- return true;
- }
- }
- return false;
+ // delegate to the section class to determine whether it applies to this selection
+ return sectionClass.appliesTo(part, selection);
}
public boolean appliesTo(EObject eObj) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java
index 0f8f3ab7..dab13487 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java
@@ -1052,7 +1052,7 @@ public class FeatureSupport {
uf.update(context);
}
}
- else {
+ else if (feature!=null) {
feature.update(context);
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java
index 37b0eb91..49f05b9c 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java
@@ -69,6 +69,7 @@ import org.eclipse.bpmn2.StartEvent;
import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.TimerEventDefinition;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
@@ -92,33 +93,35 @@ public class BPMN2ValidationConstraints extends AbstractModelConstraint {
@Override
public IStatus validate(IValidationContext ctx) {
EObject eObj = ctx.getTarget();
- EMFEventType eType = ctx.getEventType();
- String id = ctx.getCurrentConstraintId();
- if (WARNING_ID.equals(id))
- warnings = true;
- else
- warnings = false;
-
- // In the case of batch mode.
- if (eType == EMFEventType.NULL) {
- if (eObj instanceof Definitions) {
- return validateDefinitions(ctx, (Definitions) eObj);
- }
- if (eObj instanceof BaseElement) {
- return validateBaseElement(ctx, (BaseElement) eObj);
- }
- else {
- validateEObject(ctx,eObj);
- }
- } else { // In the case of live mode.
- if (eObj instanceof BaseElement) {
- return validateBaseElementLive(ctx, (BaseElement) eObj);
- }
- else {
- validateEObject(ctx,eObj);
+ Bpmn2Preferences prefs = Bpmn2Preferences.getInstance(eObj);
+ if (prefs.getDoCoreValidation()) {
+ EMFEventType eType = ctx.getEventType();
+ String id = ctx.getCurrentConstraintId();
+ if (WARNING_ID.equals(id))
+ warnings = true;
+ else
+ warnings = false;
+
+ // In the case of batch mode.
+ if (eType == EMFEventType.NULL) {
+ if (eObj instanceof Definitions) {
+ return validateDefinitions(ctx, (Definitions) eObj);
+ }
+ if (eObj instanceof BaseElement) {
+ return validateBaseElement(ctx, (BaseElement) eObj);
+ }
+ else {
+ validateEObject(ctx,eObj);
+ }
+ } else { // In the case of live mode.
+ if (eObj instanceof BaseElement) {
+ return validateBaseElementLive(ctx, (BaseElement) eObj);
+ }
+ else {
+ validateEObject(ctx,eObj);
+ }
}
}
-
return ctx.createSuccessStatus();
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties
index becab2c6..8db59a1d 100644
--- a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties
@@ -20,26 +20,25 @@ runtime.description = BPMN2 Modeler customizations for the JBoss jBPM engine
runtime.name = JBoss jBPM Business Process Engine
propertyTab.label.General = General
propertyTab.label.Process = Process
-propertyTab.label.1 = Interfaces
-propertyTab.label.2 = Definitions
-propertyTab.label.3 = Data Items
-propertyTab.label.4 = Custom Task
-propertyTab.label.5 = Task
-propertyTab.label.6 = User Task
-propertyTab.label.7 = Business Rule Task
-propertyTab.label.8 = Call Activity
-propertyTab.label.9 = Sub Process
-propertyTab.label.10 = Empty
-propertyTab.label.11 = Script Task
-propertyTab.label.12 = Service Task
-propertyTab.label.13 = Receive Task
-propertyTab.label.14 = Send Task
-propertyTab.label.15 = Manual Task
-propertyTab.label.16 = Sequence Flow
-propertyTab.label.17 = I/O Parameters
-propertyTab.label.18 = Event
-propertyTab.label.19 = Gateway
-propertyTab.label.20 = Simulation
+propertyTab.label.Interfaces = Interfaces
+propertyTab.label.Definitions = Definitions
+propertyTab.label.DataItems = Data Items
+propertyTab.label.CustomTask = Custom Task
+propertyTab.label.Task = Task
+propertyTab.label.UserTask = User Task
+propertyTab.label.BusinessRuleTask = Business Rule Task
+propertyTab.label.CallActivity = Call Activity
+propertyTab.label.SubProcess = Sub Process
+propertyTab.label.ScriptTask = Script Task
+propertyTab.label.ServiceTask = Service Task
+propertyTab.label.ReceiveTask = Receive Task
+propertyTab.label.SendTask = Send Task
+propertyTab.label.ManualTask = Manual Task
+propertyTab.label.SequenceFlow = Sequence Flow
+propertyTab.label.IOParameters = I/O Parameters
+propertyTab.label.Event = Event
+propertyTab.label.Gateway = Gateway
+propertyTab.label.Simulation = Simulation
modelExtension.name = Process Extensions
modelExtension.name.0 = SequenceFlow Extensions
modelExtension.name.1 = BusinessRuleTask Extensions
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml
index 4bf4f98a..4e80ba12 100644
--- a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml
@@ -35,7 +35,7 @@
id="bpmn2.jbpm.diagram.tab"
replaceTab="org.eclipse.bpmn2.modeler.process.diagram.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmProcessDiagramPropertySection"
- type="org.eclipse.bpmn2.di.BPMNDiagram"
+ type="org.eclipse.bpmn2.Process"
afterTab="org.eclipse.bpmn2.modeler.description.tab"
label="%propertyTab.label.Process">
</propertyTab>
@@ -45,8 +45,7 @@
replaceTab="org.eclipse.bpmn2.modeler.interface.tab"
afterTab="org.eclipse.bpmn2.modeler.process.diagram.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmInterfacePropertySection"
- type="org.eclipse.bpmn2.di.BPMNDiagram"
- label="%propertyTab.label.1">
+ label="%propertyTab.label.Interfaces">
</propertyTab>
<propertyTab
@@ -54,16 +53,15 @@
replaceTab="org.eclipse.bpmn2.modeler.definitions.tab"
afterTab="org.eclipse.bpmn2.modeler.interface.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmDefinitionsPropertySection"
- type="org.eclipse.bpmn2.di.BPMNDiagram"
- label="%propertyTab.label.2">
+ type="org.eclipse.bpmn2.Definitions"
+ label="%propertyTab.label.Definitions">
</propertyTab>
<propertyTab
id="bpmn2.jbpm.dataitems.tab"
replaceTab="org.eclipse.bpmn2.modeler.dataitems.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmDataItemsPropertySection"
- type="org.eclipse.bpmn2.di.BPMNDiagram"
- label="%propertyTab.label.3">
+ label="%propertyTab.label.DataItems">
</propertyTab>
<propertyTab
@@ -72,7 +70,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmCustomTaskPropertySection"
type="org.eclipse.bpmn2.Task"
- label="%propertyTab.label.4">
+ label="%propertyTab.label.CustomTask">
</propertyTab>
<propertyTab
@@ -81,7 +79,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmTaskPropertySection"
type="org.eclipse.bpmn2.Task"
- label="%propertyTab.label.5">
+ label="%propertyTab.label.Task">
</propertyTab>
<propertyTab
@@ -90,7 +88,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmUserTaskPropertySection"
type="org.eclipse.bpmn2.UserTask"
- label="%propertyTab.label.6">
+ label="%propertyTab.label.UserTask">
</propertyTab>
<propertyTab
@@ -99,7 +97,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmBusinessRuleTaskPropertySection"
type="org.eclipse.bpmn2.BusinessRuleTask"
- label="%propertyTab.label.7">
+ label="%propertyTab.label.BusinessRuleTask">
</propertyTab>
<propertyTab
@@ -108,7 +106,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmCallActivityPropertySection"
type="org.eclipse.bpmn2.CallActivity"
- label="%propertyTab.label.8">
+ label="%propertyTab.label.CallActivity">
</propertyTab>
<propertyTab
@@ -117,14 +115,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmSubProcessPropertySection"
type="org.eclipse.bpmn2.SubProcess"
- label="%propertyTab.label.9">
- </propertyTab>
-
- <propertyTab
- id="bpmn2.jbpm.empty.tab"
- replaceTab="org.eclipse.bpmn2.modeler.main.tab"
- class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmEmptyPropertySection"
- label="%propertyTab.label.10">
+ label="%propertyTab.label.SubProcess">
</propertyTab>
<propertyTab
@@ -133,7 +124,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmScriptTaskPropertySection"
type="org.eclipse.bpmn2.ScriptTask"
- label="%propertyTab.label.11">
+ label="%propertyTab.label.ScriptTask">
</propertyTab>
<propertyTab
@@ -142,7 +133,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmServiceTaskPropertySection"
type="org.eclipse.bpmn2.ServiceTask"
- label="%propertyTab.label.12">
+ label="%propertyTab.label.ServiceTask">
</propertyTab>
<propertyTab
@@ -151,7 +142,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmReceiveTaskPropertySection"
type="org.eclipse.bpmn2.ReceiveTask"
- label="%propertyTab.label.13">
+ label="%propertyTab.label.ReceiveTask">
</propertyTab>
<propertyTab
@@ -160,7 +151,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmSendTaskPropertySection"
type="org.eclipse.bpmn2.SendTask"
- label="%propertyTab.label.14">
+ label="%propertyTab.label.SendTask">
</propertyTab>
<propertyTab
@@ -169,7 +160,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmManualTaskPropertySection"
type="org.eclipse.bpmn2.ManualTask"
- label="%propertyTab.label.15">
+ label="%propertyTab.label.ManualTask">
</propertyTab>
<propertyTab
@@ -178,7 +169,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmSequenceFlowPropertySection"
type="org.eclipse.bpmn2.SequenceFlow"
- label="%propertyTab.label.16">
+ label="%propertyTab.label.SequenceFlow">
</propertyTab>
<propertyTab
@@ -186,7 +177,7 @@
replaceTab="org.eclipse.bpmn2.modeler.activity.io.tab"
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmIoParametersPropertySection"
- label="%propertyTab.label.17">
+ label="%propertyTab.label.IOParameters">
</propertyTab>
<propertyTab
@@ -195,7 +186,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmCommonEventPropertySection"
type="org.eclipse.bpmn2.Event"
- label="%propertyTab.label.18">
+ label="%propertyTab.label.Event">
</propertyTab>
<propertyTab
@@ -204,14 +195,14 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmGatewayPropertySection"
type="org.eclipse.bpmn2.Gateway"
- label="%propertyTab.label.19">
+ label="%propertyTab.label.Gateway">
</propertyTab>
<propertyTab
id="org.jboss.runtime.jbpm5.simulation.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.SimulationPropertySection"
type="org.eclipse.bpmn2.BaseElement"
- label="%propertyTab.label.20">
+ label="%propertyTab.label.Simulation">
</propertyTab>
<!-- Property Extension Adapters -->
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java
index 85f25ac1..e71b6bee 100644
--- a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java
@@ -12,16 +12,10 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property;
-import java.util.List;
-
-import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbenchPart;
@@ -46,19 +40,9 @@ public class JbpmCustomTaskPropertySection extends JbpmTaskPropertySection imple
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
if (super.appliesTo(part, selection)) {
// only show this property section if the selected Task is a "custom task"
- // that is, it has a "taskName" extension attribute
- BPMN2Editor editor = (BPMN2Editor)part.getAdapter(BPMN2Editor.class);
- if (editor!=null) {
- EObject object = BusinessObjectUtil.getBusinessObjectForSelection(selection);
-
- if (object.eClass() == Bpmn2Package.eINSTANCE.getTask() && isModelObjectEnabled(object)) {
- List<EStructuralFeature> features = ModelDecorator.getAnyAttributes(object);
- for (EStructuralFeature f : features) {
- if ("displayName".equals(f.getName())) //$NON-NLS-1$
- return true;
- }
- }
- }
+ // that is, it has a "displayName" extension attribute
+ EObject be = getBusinessObjectForSelection(selection);
+ return ModelDecorator.getAnyAttribute(be, "displayName") != null;
}
return false;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java
index f38adfec..0326bb75 100644
--- a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java
@@ -45,11 +45,6 @@ public class JbpmDefinitionsPropertySection extends DefinitionsPropertySection {
return new JbpmDefinitionsPropertyComposite(parent,style);
}
- @Override
- public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
- return super.appliesTo(part, selection);
- }
-
public class JbpmMessageDetailComposite extends DefaultDetailComposite {
private AbstractPropertiesProvider propertiesProvider;
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java
index 6840a184..0806d5c3 100644
--- a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java
@@ -22,9 +22,7 @@ import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.ExternalProcess;
import org.eclipse.bpmn2.modeler.ui.property.DescriptionPropertySection;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
/**
* This is an empty tab section which simply exists to hide the "Basic" tab
@@ -34,14 +32,6 @@ import org.eclipse.ui.IWorkbenchPart;
*
*/
public class JbpmDescriptionPropertySection extends DescriptionPropertySection {
-
- @Override
- public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
- if (super.appliesTo(part, selection)) {
- return getBusinessObjectForSelection(selection) != null;
- }
- return false;
- }
@Override
protected AbstractDetailComposite createSectionRoot() {
@@ -55,7 +45,6 @@ public class JbpmDescriptionPropertySection extends DescriptionPropertySection {
public JbpmDescriptionPropertySection() {
super();
- // TODO Auto-generated constructor stub
}
public class JbpmDescriptionPropertyComposite extends DescriptionDetailComposite {
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmEmptyPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmEmptyPropertySection.java
deleted file mode 100644
index 512f14f5..00000000
--- a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmEmptyPropertySection.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property;
-
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
-import org.eclipse.bpmn2.modeler.ui.property.tasks.TaskPropertySection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This is an empty tab section which simply exists to hide the "Basic" tab
- * defined the editor UI plugin.
- *
- * @author Bob Brodt
- *
- */
-public class JbpmEmptyPropertySection extends TaskPropertySection {
-
- @Override
- protected AbstractDetailComposite createSectionRoot() {
- return null;
- }
-
- @Override
- public AbstractDetailComposite createSectionRoot(Composite parent, int style) {
- return null;
- }
-
- @Override
- public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
- return false;
- }
-
- @Override
- public boolean doReplaceTab(String id, IWorkbenchPart part, ISelection selection) {
- return true;
- }
-}
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java
index 33907e94..8ee26f41 100644
--- a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java
@@ -17,7 +17,6 @@ import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Gateway;
import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.ui.property.connectors.SequenceFlowPropertySection;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -34,7 +33,7 @@ public class JbpmSequenceFlowPropertySection extends SequenceFlowPropertySection
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
if (super.appliesTo(part, selection)) {
- EObject be = BusinessObjectUtil.getBusinessObjectForSelection(selection);
+ EObject be = getBusinessObjectForSelection(selection);
if (be instanceof SequenceFlow) {
// only show this tab if the sequence flow is attached to a Gateway
if (((SequenceFlow) be).getSourceRef() instanceof Gateway) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java
index 3d135ef0..c6877810 100644
--- a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java
@@ -13,15 +13,11 @@
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property;
-import java.util.List;
-
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.ui.property.tasks.TaskPropertySection;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbenchPart;
@@ -35,15 +31,9 @@ public class JbpmTaskPropertySection extends TaskPropertySection {
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
if (super.appliesTo(part, selection)) {
- EObject object = BusinessObjectUtil.getBusinessObjectForSelection(selection);
- if (object!=null && Bpmn2Package.eINSTANCE.getTask().isInstance(object)) {
- List<EStructuralFeature> features = ModelDecorator.getAnyAttributes(object);
- for (EStructuralFeature f : features) {
- if ("displayName".equals(f.getName())) //$NON-NLS-1$
- // don't display this tab for Custom Tasks
- return false;
- }
- return true;
+ EObject be = getBusinessObjectForSelection(selection);
+ if (Bpmn2Package.eINSTANCE.getTask().isInstance(be)) {
+ return ModelDecorator.getAnyAttribute(be, "displayName") == null;
}
}
return false;
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java
index 2bdcef3e..0d9f4a7a 100644
--- a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java
@@ -19,9 +19,6 @@ import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.bpsim.BpsimPackage;
-import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.DroolsPackage;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.preferences.JbpmPreferencePage;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
@@ -43,11 +40,11 @@ public class SimulationPropertySection extends DefaultPropertySection {
return false;
// and all this other stuff...
- EObject object = BusinessObjectUtil.getBusinessObjectForSelection(selection);
- return object instanceof BPMNDiagram ||
- object instanceof Task ||
- object instanceof Event ||
- object instanceof SequenceFlow;
+ EObject be = getBusinessObjectForSelection(selection);
+ return be instanceof BPMNDiagram ||
+ be instanceof Task ||
+ be instanceof Event ||
+ be instanceof SequenceFlow;
}
@Override
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties b/plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties
index 97128680..514baad5 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties
@@ -34,64 +34,67 @@ runtime.name = None
propertyTab.label.General = General
propertyTab.label.Process = Process
propertyTab.label.Definitions = Definitions
-propertyTab.label.2 = Association
-propertyTab.label.3 = Data Association
-propertyTab.label.4 = Sequence Flow
-propertyTab.label.5 = Message Flow
-propertyTab.label.6 = Call Activity
-propertyTab.label.7 = Sub Process
-propertyTab.label.8 = AdHoc Sub Process
-propertyTab.label.9 = Transaction
-propertyTab.label.10 = Task
-propertyTab.label.11 = Business Rule Task
-propertyTab.label.12 = Manual Task
-propertyTab.label.13 = Receive Task
-propertyTab.label.14 = Script Task
-propertyTab.label.15 = Send Task
-propertyTab.label.16 = Service Task
-propertyTab.label.17 = User Task
-propertyTab.label.18 = Global Business Rule Task
-propertyTab.label.19 = Global Manual Task
-propertyTab.label.20 = Global Script Task
-propertyTab.label.21 = Global User Task
-propertyTab.label.22 = Call Choreography
-propertyTab.label.23 = Choreography Task
-propertyTab.label.24 = Sub Choreography
-propertyTab.label.25 = Conversation
-propertyTab.label.26 = Gateway
-propertyTab.label.27 = Event
-propertyTab.label.28 = Conditional Event
-propertyTab.label.29 = Compensate Event
-propertyTab.label.30 = Error Event
-propertyTab.label.31 = Escalation Event
-propertyTab.label.33 = Link Event
-propertyTab.label.34 = Message Event
-propertyTab.label.35 = Signal Event
-propertyTab.label.36 = Timer Event
-propertyTab.label.37 = Group
-propertyTab.label.38 = Text Annotation
-propertyTab.label.39 = Error
-propertyTab.label.40 = Escalation
-propertyTab.label.41 = Interfaces
-propertyTab.label.42 = Interface
-propertyTab.label.43 = Operation
-propertyTab.label.44 = Data Type
-propertyTab.label.45 = Message
-propertyTab.label.46 = Partner
-propertyTab.label.47 = Partner Role
-propertyTab.label.48 = Resource
-propertyTab.label.49 = Signal
-propertyTab.label.50 = Data Items
-propertyTab.label.51 = Data Input
-propertyTab.label.52 = Data Object
-propertyTab.label.53 = Reference
-propertyTab.label.54 = Data Output
-propertyTab.label.55 = Data Store
-propertyTab.label.56 = Reference
-propertyTab.label.57 = I/O Parameters
-propertyTab.label.58 = Advanced
-propertyTab.label.59 = Category
-propertyTab.label.60 = Participant
+propertyTab.label.Association = Association
+propertyTab.label.DataAssociation = Data Association
+propertyTab.label.SequenceFlow = Sequence Flow
+propertyTab.label.MessageFlow = Message Flow
+propertyTab.label.CallActivity = Call Activity
+propertyTab.label.SubProcess = Sub Process
+propertyTab.label.AdHocSubProcess = AdHoc Sub Process
+propertyTab.label.Transaction = Transaction
+propertyTab.label.Task = Task
+propertyTab.label.BusinessRuleTask = Business Rule Task
+propertyTab.label.ManualTask = Manual Task
+propertyTab.label.ReceiveTask = Receive Task
+propertyTab.label.ScriptTask = Script Task
+propertyTab.label.SendTask = Send Task
+propertyTab.label.ServiceTask = Service Task
+propertyTab.label.UserTask = User Task
+propertyTab.label.GlobalBusinessRuleTask = Global Business Rule Task
+propertyTab.label.GlobalManualTask = Global Manual Task
+propertyTab.label.GlobalScriptTask = Global Script Task
+propertyTab.label.GlobalUserTask = Global User Task
+propertyTab.label.CallChoreography = Call Choreography
+propertyTab.label.ChoreographyTask = Choreography Task
+propertyTab.label.SubSub = Sub Choreography
+propertyTab.label.Conversation = Conversation
+propertyTab.label.Gateway = Gateway
+propertyTab.label.Event = Event
+propertyTab.label.ConditionalEvent = Conditional Event
+propertyTab.label.CompensateEvent = Compensate Event
+propertyTab.label.ErrorEvent = Error Event
+propertyTab.label.EscalationEvent = Escalation Event
+propertyTab.label.LinkEvent = Link Event
+propertyTab.label.MessageEvent = Message Event
+propertyTab.label.SignalEvent = Signal Event
+propertyTab.label.TimerEvent = Timer Event
+propertyTab.label.Group = Group
+propertyTab.label.TextAnnotation = Text Annotation
+propertyTab.label.Error = Error
+propertyTab.label.Escalation = Escalation
+propertyTab.label.Interfaces = Interfaces
+propertyTab.label.Interface = Interface
+propertyTab.label.Operations = Operation
+propertyTab.label.DataType = Data Type
+propertyTab.label.Message = Message
+propertyTab.label.Partner = Partner
+propertyTab.label.PartnerRole = Partner Role
+propertyTab.label.Resource = Resource
+propertyTab.label.Signal = Signal
+propertyTab.label.DataItems = Data Items
+propertyTab.label.DataInput = Data Input
+propertyTab.label.DataObject = Data Object
+propertyTab.label.DataOutput = Data Output
+propertyTab.label.DataStore = Data Store
+propertyTab.label.Reference = Reference
+propertyTab.label.IOParameters = I/O Parameters
+propertyTab.label.Advanced = Advanced
+propertyTab.label.Category = Category
+propertyTab.label.Participant = Participant
+propertyTab.label.Collaboration = Collaboration
+propertyTab.label.Choreography = Choreography
+propertyTab.label.CorrelationProperty = Correlation Property
+propertyTab.label.Correlation = Correlation
category.name = Workflow Patterns
arbitrary.cycles.description = Arbitrary Cycles Pattern
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/plugin.xml b/plugins/org.eclipse.bpmn2.modeler.ui/plugin.xml
index c464d701..509a8f1f 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/plugin.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/plugin.xml
@@ -187,37 +187,46 @@
</propertyTab>
<!-- ============ Diagrams ============ -->
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.participant.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.diagrams.ParticipantPropertySection"
+ type="org.eclipse.bpmn2.Participant"
+ label="%propertyTab.label.Participant">
+ </propertyTab>
+
<propertyTab
id="org.eclipse.bpmn2.modeler.process.diagram.tab"
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.diagrams.ProcessDiagramPropertySection"
- type="org.eclipse.bpmn2.di.BPMNDiagram"
+ type="org.eclipse.bpmn2.Process"
label="%propertyTab.label.Process">
</propertyTab>
<propertyTab
- id="org.eclipse.bpmn2.modeler.participant.tab"
- afterTab="org.eclipse.bpmn2.modeler.description.tab"
- class="org.eclipse.bpmn2.modeler.ui.property.diagrams.ParticipantPropertySection"
- type="org.eclipse.bpmn2.Participant"
- label="%propertyTab.label.60">
+ id="org.eclipse.bpmn2.modeler.interface.tab"
+ afterTab="org.eclipse.bpmn2.modeler.process.diagram.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.data.InterfacePropertySection"
+ type="org.eclipse.bpmn2.Process org.eclipse.bpmn2.Collaboration org.eclipse.bpmn2.Participant"
+ label="%propertyTab.label.Interfaces">
</propertyTab>
<propertyTab
id="org.eclipse.bpmn2.modeler.definitions.tab"
afterTab="org.eclipse.bpmn2.modeler.interface.tab"
class="org.eclipse.bpmn2.modeler.ui.property.diagrams.DefinitionsPropertySection"
- type="org.eclipse.bpmn2.di.BPMNDiagram org.eclipse.bpmn2.Process"
+ type="org.eclipse.bpmn2.Definitions"
label="%propertyTab.label.Definitions">
</propertyTab>
<propertyTab
id="org.eclipse.bpmn2.modeler.collaboration.tab"
afterTab="org.eclipse.bpmn2.modeler.description.tab"
- class="default"
+ class="org.eclipse.bpmn2.modeler.ui.property.diagrams.CollaborationDiagramPropertySection"
features="isClosed correlationKeys"
type="org.eclipse.bpmn2.Collaboration"
- label="Collaboration">
+ label="%propertyTab.label.Collaboration">
</propertyTab>
<propertyTab
@@ -226,7 +235,7 @@
class="default"
features="isClosed correlationKeys"
type="org.eclipse.bpmn2.Choreography"
- label="Choreography">
+ label="%propertyTab.label.Choreography">
</propertyTab>
<!-- ============ Connections ============ -->
@@ -236,7 +245,7 @@
class="default"
features="associationDirection"
type="org.eclipse.bpmn2.Association"
- label="%propertyTab.label.2">
+ label="%propertyTab.label.Association">
</propertyTab>
<propertyTab
@@ -245,7 +254,7 @@
class="default"
features="transformation assignment"
type="org.eclipse.bpmn2.DataInputAssociation org.eclipse.bpmn2.DataOutputAssociation"
- label="%propertyTab.label.3">
+ label="%propertyTab.label.DataAssociation">
</propertyTab>
<propertyTab
@@ -253,7 +262,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.connectors.SequenceFlowPropertySection"
type="org.eclipse.bpmn2.SequenceFlow"
- label="%propertyTab.label.4">
+ label="%propertyTab.label.SequenceFlow">
</propertyTab>
<propertyTab
@@ -261,7 +270,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.connectors.MessageFlowPropertySection"
type="org.eclipse.bpmn2.MessageFlow"
- label="%propertyTab.label.5">
+ label="%propertyTab.label.MessageFlow">
</propertyTab>
<!-- ============ Activities ============ -->
@@ -270,7 +279,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
type="org.eclipse.bpmn2.CallActivity"
- label="%propertyTab.label.6">
+ label="%propertyTab.label.CallActivity">
</propertyTab>
<propertyTab
@@ -278,7 +287,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.SubProcessPropertySection"
type="org.eclipse.bpmn2.SubProcess"
- label="%propertyTab.label.7">
+ label="%propertyTab.label.SubProcess">
</propertyTab>
<propertyTab
@@ -286,7 +295,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
type="org.eclipse.bpmn2.AdHocSubProcess"
- label="%propertyTab.label.8">
+ label="%propertyTab.label.AdHocSubProcess">
</propertyTab>
<propertyTab
@@ -294,7 +303,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
type="org.eclipse.bpmn2.Transaction"
- label="%propertyTab.label.9">
+ label="%propertyTab.label.Transaction">
</propertyTab>
<!-- ============ Tasks ============ -->
@@ -303,7 +312,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.tasks.TaskPropertySection"
type="org.eclipse.bpmn2.Task"
- label="%propertyTab.label.10">
+ label="%propertyTab.label.Task">
</propertyTab>
<propertyTab
@@ -311,7 +320,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
type="org.eclipse.bpmn2.BusinessRuleTask"
- label="%propertyTab.label.11">
+ label="%propertyTab.label.BusinessRuleTask">
</propertyTab>
<propertyTab
@@ -319,7 +328,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ManualTaskPropertySection"
type="org.eclipse.bpmn2.ManualTask"
- label="%propertyTab.label.12">
+ label="%propertyTab.label.ManualTask">
</propertyTab>
<propertyTab
@@ -328,7 +337,7 @@
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
features="implementation instantiate messageRef operationRef isForCompensation"
type="org.eclipse.bpmn2.ReceiveTask"
- label="%propertyTab.label.13">
+ label="%propertyTab.label.ReceiveTask">
</propertyTab>
<propertyTab
@@ -336,7 +345,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ScriptTaskPropertySection"
type="org.eclipse.bpmn2.ScriptTask"
- label="%propertyTab.label.14">
+ label="%propertyTab.label.ScriptTask">
</propertyTab>
<propertyTab
@@ -345,7 +354,7 @@
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
features="implementation messageRef operationRef isForCompensation"
type="org.eclipse.bpmn2.SendTask"
- label="%propertyTab.label.15">
+ label="%propertyTab.label.SendTask">
</propertyTab>
<propertyTab
@@ -354,7 +363,7 @@
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
features="implementation operationRef isForCompensation"
type="org.eclipse.bpmn2.ServiceTask"
- label="%propertyTab.label.16">
+ label="%propertyTab.label.ServiceTask">
</propertyTab>
<propertyTab
@@ -363,7 +372,7 @@
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
features="implementation resources renderings isForCompensation"
type="org.eclipse.bpmn2.UserTask"
- label="%propertyTab.label.17">
+ label="%propertyTab.label.UserTask">
</propertyTab>
<!-- ============ Global Tasks ============ -->
@@ -374,7 +383,7 @@
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
features="implementation resources"
type="org.eclipse.bpmn2.GlobalBusinessRuleTask"
- label="%propertyTab.label.18">
+ label="%propertyTab.label.GlobalBusinessRuleTask">
</propertyTab>
<propertyTab
@@ -383,7 +392,7 @@
class="default"
features="resources"
type="org.eclipse.bpmn2.GlobalManualTask"
- label="%propertyTab.label.19">
+ label="%propertyTab.label.GlobalManualTask">
</propertyTab>
<propertyTab
@@ -392,7 +401,7 @@
class="default"
features="scriptLanguage script resources"
type="org.eclipse.bpmn2.GlobalScriptTask"
- label="%propertyTab.label.20">
+ label="%propertyTab.label.GlobalScriptTask">
</propertyTab>
<propertyTab
@@ -401,7 +410,7 @@
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
features="implementation resources"
type="org.eclipse.bpmn2.GlobalUserTask"
- label="%propertyTab.label.21">
+ label="%propertyTab.label.GlobalUserTask">
</propertyTab>
<!-- ============ Choreography Activities ============ -->
@@ -410,7 +419,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
type="org.eclipse.bpmn2.CallChoreography"
- label="%propertyTab.label.22">
+ label="%propertyTab.label.CallChoreography">
</propertyTab>
<propertyTab
@@ -419,7 +428,7 @@
class="default"
features="loopType initiatingParticipantRef correlationKeys messageFlowRef"
type="org.eclipse.bpmn2.ChoreographyTask"
- label="%propertyTab.label.23">
+ label="%propertyTab.label.ChoreographyTask">
</propertyTab>
<propertyTab
@@ -428,7 +437,7 @@
class="default"
features="anyAttribute loopType participantRefs initiatingParticipantRef correlationKeys artifacts"
type="org.eclipse.bpmn2.SubChoreography"
- label="%propertyTab.label.24">
+ label="%propertyTab.label.SubChoreography">
</propertyTab>
<propertyTab
@@ -437,7 +446,7 @@
class="default"
features="correlationKeys"
type="org.eclipse.bpmn2.Conversation"
- label="%propertyTab.label.25">
+ label="%propertyTab.label.Conversation">
</propertyTab>
<!-- ============ Gateways ============ -->
@@ -446,7 +455,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.gateways.GatewayPropertySection"
type="org.eclipse.bpmn2.Gateway"
- label="%propertyTab.label.26">
+ label="%propertyTab.label.Gateway">
</propertyTab>
<!-- ============ Events ============ -->
@@ -455,7 +464,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.events.CommonEventPropertySection"
type="org.eclipse.bpmn2.Event"
- label="%propertyTab.label.27">
+ label="%propertyTab.label.Event">
</propertyTab>
<!-- ============ Event Definitionss ============ -->
@@ -465,7 +474,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.events.ConditionalEventDefinitionPropertySection"
type="org.eclipse.bpmn2.ConditionalEventDefinition"
- label="%propertyTab.label.28">
+ label="%propertyTab.label.ConditionalEvent">
</propertyTab>
<propertyTab
@@ -474,7 +483,7 @@
class="default"
features="activityRef waitForCompletion"
type="org.eclipse.bpmn2.CompensateEventDefinition"
- label="%propertyTab.label.29">
+ label="%propertyTab.label.CompensateEvent">
</propertyTab>
<propertyTab
@@ -483,7 +492,7 @@
class="default"
features="errorRef"
type="org.eclipse.bpmn2.ErrorEventDefinition"
- label="%propertyTab.label.30">
+ label="%propertyTab.label.ErrorEvent">
</propertyTab>
<propertyTab
@@ -492,7 +501,7 @@
class="default"
features="escalationRef"
type="org.eclipse.bpmn2.EscalationEventDefinition"
- label="%propertyTab.label.31">
+ label="%propertyTab.label.EscalationEvent">
</propertyTab>
<propertyTab
@@ -501,7 +510,7 @@
class="default"
features="name"
type="org.eclipse.bpmn2.LinkEventDefinition"
- label="%propertyTab.label.33">
+ label="%propertyTab.label.LinkEvent">
</propertyTab>
<propertyTab
@@ -510,7 +519,7 @@
class="default"
features="messageRef operationReft"
type="org.eclipse.bpmn2.MessageEventDefinition"
- label="%propertyTab.label.34">
+ label="%propertyTab.label.MessageEvent">
</propertyTab>
<propertyTab
@@ -519,7 +528,7 @@
class="default"
features="signalRef"
type="org.eclipse.bpmn2.SignalEventDefinition"
- label="%propertyTab.label.35">
+ label="%propertyTab.label.SignalEvent">
</propertyTab>
<propertyTab
@@ -527,7 +536,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.events.TimerEventDefinitionPropertySection"
type="org.eclipse.bpmn2.TimerEventDefinition"
- label="%propertyTab.label.36">
+ label="%propertyTab.label.TimerEvent">
</propertyTab>
<!-- ============ Artifacts ============ -->
@@ -538,7 +547,7 @@
class="default"
features="categoryValueRef"
type="org.eclipse.bpmn2.Group"
- label="%propertyTab.label.37">
+ label="%propertyTab.label.Group">
</propertyTab>
<propertyTab
@@ -546,7 +555,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.artifact.TextAnnotationPropertySection"
type="org.eclipse.bpmn2.TextAnnotation"
- label="%propertyTab.label.38">
+ label="%propertyTab.label.TextAnnotation">
</propertyTab>
<!-- ============ Root Elements ============ -->
@@ -556,7 +565,7 @@
class="default"
features="errorCode structureRef"
type="org.eclipse.bpmn2.Error"
- label="%propertyTab.label.39">
+ label="%propertyTab.label.Error">
</propertyTab>
<propertyTab
@@ -565,15 +574,7 @@
class="default"
features="escalationCode structureRef"
type="org.eclipse.bpmn2.Escalation"
- label="%propertyTab.label.40">
- </propertyTab>
-
- <propertyTab
- id="org.eclipse.bpmn2.modeler.interface.tab"
- afterTab="org.eclipse.bpmn2.modeler.process.diagram.tab"
- class="org.eclipse.bpmn2.modeler.ui.property.data.InterfacePropertySection"
- type="org.eclipse.bpmn2.di.BPMNDiagram org.eclipse.bpmn2.Process org.eclipse.bpmn2.Participant"
- label="%propertyTab.label.41">
+ label="%propertyTab.label.Escalation">
</propertyTab>
<propertyTab
@@ -581,7 +582,7 @@
afterTab="org.eclipse.bpmn2.modeler.process.diagram.tab"
class="org.eclipse.bpmn2.modeler.ui.property.data.InterfacePropertySection"
type="org.eclipse.bpmn2.Interface"
- label="%propertyTab.label.42">
+ label="%propertyTab.label.Interface">
</propertyTab>
<propertyTab
@@ -590,7 +591,7 @@
class="default"
features="implementationRef inMessageRef outMessageRef errorRefs"
type="org.eclipse.bpmn2.Operation"
- label="%propertyTab.label.43">
+ label="%propertyTab.label.Operation">
</propertyTab>
<propertyTab
@@ -599,7 +600,7 @@
class="default"
features="itemKind structureRef isCollection"
type="org.eclipse.bpmn2.ItemDefinition"
- label="%propertyTab.label.44">
+ label="%propertyTab.label.DataType">
</propertyTab>
<propertyTab
@@ -608,7 +609,7 @@
class="default"
features="itemRef"
type="org.eclipse.bpmn2.Message"
- label="%propertyTab.label.45">
+ label="%propertyTab.label.Message">
</propertyTab>
<propertyTab
@@ -617,7 +618,7 @@
class="default"
features="participantRef"
type="org.eclipse.bpmn2.PartnerEntity"
- label="%propertyTab.label.46">
+ label="%propertyTab.label.Partner">
</propertyTab>
<propertyTab
@@ -626,7 +627,7 @@
class="default"
features="participantRef"
type="org.eclipse.bpmn2.PartnerRole"
- label="%propertyTab.label.47">
+ label="%propertyTab.label.PartnerRole">
</propertyTab>
<propertyTab
@@ -635,7 +636,7 @@
class="default"
features="resourceParameters"
type="org.eclipse.bpmn2.Resource"
- label="%propertyTab.label.48">
+ label="%propertyTab.label.Resource">
</propertyTab>
<propertyTab
@@ -644,7 +645,7 @@
class="default"
features="structureRef"
type="org.eclipse.bpmn2.Signal"
- label="%propertyTab.label.49">
+ label="%propertyTab.label.Signal">
</propertyTab>
<propertyTab
@@ -653,7 +654,7 @@
class="default"
features="categoryValue"
type="org.eclipse.bpmn2.Category"
- label="%propertyTab.label.59">
+ label="%propertyTab.label.Category">
</propertyTab>
<!-- ============ Item Aware Elements ============ -->
@@ -661,8 +662,7 @@
id="org.eclipse.bpmn2.modeler.dataitems.tab"
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.diagrams.DataItemsPropertySection"
- type="org.eclipse.bpmn2.di.BPMNDiagram org.eclipse.bpmn2.Process org.eclipse.bpmn2.Participant"
- label="%propertyTab.label.50">
+ label="%propertyTab.label.DataItems">
</propertyTab>
<propertyTab
@@ -670,7 +670,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.data.DataInputPropertySection"
type="org.eclipse.bpmn2.DataInput"
- label="%propertyTab.label.51">
+ label="%propertyTab.label.DataInput">
</propertyTab>
<propertyTab
@@ -678,7 +678,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.data.DataObjectPropertySection"
type="org.eclipse.bpmn2.DataObject org.eclipse.bpmn2.DataObjectReference"
- label="%propertyTab.label.52">
+ label="%propertyTab.label.DataObject">
</propertyTab>
<propertyTab
@@ -686,7 +686,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.data.DataObjectReferencePropertySection"
type="org.eclipse.bpmn2.DataObjectReference"
- label="%propertyTab.label.53">
+ label="%propertyTab.label.Reference">
</propertyTab>
<propertyTab
@@ -694,7 +694,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.data.DataOutputPropertySection"
type="org.eclipse.bpmn2.DataOutput"
- label="%propertyTab.label.54">
+ label="%propertyTab.label.DataOutput">
</propertyTab>
<propertyTab
@@ -702,7 +702,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.data.DataStorePropertySection"
type="org.eclipse.bpmn2.DataStore org.eclipse.bpmn2.DataStoreReference"
- label="%propertyTab.label.55">
+ label="%propertyTab.label.DataStore">
</propertyTab>
<propertyTab
@@ -710,14 +710,14 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.data.DataStoreReferencePropertySection"
type="org.eclipse.bpmn2.DataStoreReference"
- label="%propertyTab.label.56">
+ label="%propertyTab.label.Reference">
</propertyTab>
<propertyTab
id="org.eclipse.bpmn2.modeler.activity.io.tab"
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.tasks.IoParametersPropertySection"
- label="%propertyTab.label.57">
+ label="%propertyTab.label.IOParameters">
</propertyTab>
<propertyTab
@@ -726,7 +726,7 @@
class="default"
features="correlationPropertyRetrievalExpression type"
type="org.eclipse.bpmn2.CorrelationProperty"
- label="Correlation Property">
+ label="%propertyTab.label.CorrelationProperty">
</propertyTab>
<propertyTab
@@ -735,7 +735,7 @@
class="default"
features="messagePath messageRef"
type="org.eclipse.bpmn2.CorrelationPropertyRetrievalExpression"
- label="Correlation">
+ label="%propertyTab.label.Correlation">
</propertyTab>
<propertyTab
@@ -743,7 +743,7 @@
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.AdvancedPropertySection"
popup="false"
- label="%propertyTab.label.58">
+ label="%propertyTab.label.Advanced">
</propertyTab>
<toolPalette
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java
index ecabf183..230232a4 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java
@@ -386,8 +386,11 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
ac.setNewObject(association);
IAddFeature af = fp.getAddFeature(ac);
if (af.canAdd(ac)) {
- af.add(ac);
- hasDoneChanges = true;
+ PictogramElement pe = af.add(ac);
+ if (pe instanceof Connection) {
+ connection = (Connection) pe;
+ hasDoneChanges = true;
+ }
}
}
if (hasDoneChanges) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java
index e289e998..4b4f317e 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java
@@ -43,15 +43,15 @@ public class ItemAwareElementPropertiesAdapter<T extends ItemAwareElement> exten
super(adapterFactory, object);
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getItemAwareElement_ItemSubjectRef();
-
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setProperty(feature, UI_CAN_CREATE_NEW, Boolean.FALSE);
-
+ setProperty(feature, UI_CAN_CREATE_NEW, Boolean.TRUE);
setFeatureDescriptor(feature,
new ItemDefinitionRefFeatureDescriptor<T>(this, object, feature)
);
feature = Bpmn2Package.eINSTANCE.getItemAwareElement_DataState();
+ setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
+ setProperty(feature, UI_CAN_CREATE_NEW, Boolean.TRUE);
setFeatureDescriptor(feature,
new FeatureDescriptor<T>(this, object,feature) {
@@ -97,8 +97,5 @@ public class ItemAwareElementPropertiesAdapter<T extends ItemAwareElement> exten
}
}
);
-
- setProperty(Bpmn2Package.eINSTANCE.getItemAwareElement_DataState(), UI_IS_MULTI_CHOICE, Boolean.TRUE);
}
-
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java
index 93f9e9d8..fce4a647 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java
@@ -54,8 +54,6 @@ public class ItemDefinitionRefFeatureDescriptor<T extends BaseElement> extends F
*/
public ItemDefinitionRefFeatureDescriptor(ExtendedPropertiesAdapter<T> owner, T object, EStructuralFeature feature) {
super(owner, object, feature);
- owner.setProperty(feature, ExtendedPropertiesAdapter.UI_CAN_CREATE_NEW, Boolean.FALSE);
-
// I found a couple of instances where this class was used for references that were NOT
// RootElements - just check to make sure here...
Assert.isTrue( RootElement.class.isAssignableFrom(feature.getEType().getInstanceClass()) );
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java
index 757bdc60..13c3161e 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java
@@ -49,8 +49,8 @@ public class PropertyPropertiesAdapter extends ItemAwareElementPropertiesAdapter
public PropertyPropertiesAdapter(AdapterFactory adapterFactory, Property object) {
super(adapterFactory, object);
- EStructuralFeature f = Bpmn2Package.eINSTANCE.getProperty_Name();
- final FeatureDescriptor<Property> fd = new FeatureDescriptor<Property>(this,object,f) {
+ EStructuralFeature feature = Bpmn2Package.eINSTANCE.getProperty_Name();
+ final FeatureDescriptor<Property> fd = new FeatureDescriptor<Property>(this,object,feature) {
@Override
public void setTextValue(String text) {
@@ -87,7 +87,7 @@ public class PropertyPropertiesAdapter extends ItemAwareElementPropertiesAdapter
}
};
- setFeatureDescriptor(f, fd);
+ setFeatureDescriptor(feature, fd);
setObjectDescriptor(new ObjectDescriptor<Property>(this,object) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMN2FeatureProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMN2FeatureProvider.java
index b721458f..c8b9f773 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMN2FeatureProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMN2FeatureProvider.java
@@ -400,6 +400,9 @@ public class BPMN2FeatureProvider extends DefaultFeatureProvider implements IBpm
} else if (context instanceof IPictogramElementContext) {
return BusinessObjectUtil.getFirstElementOfType(
(((IPictogramElementContext) context).getPictogramElement()), EObject.class);
+ } else if (context instanceof IReconnectionContext) {
+ return BusinessObjectUtil.getFirstElementOfType(
+ (((IReconnectionContext) context).getConnection()), EObject.class);
}
return null;
}
@@ -416,16 +419,16 @@ public class BPMN2FeatureProvider extends DefaultFeatureProvider implements IBpm
// if (lfc.getApplyObject(context)!=null)
// return lfc;
+ BPMN2Editor editor = (BPMN2Editor)getDiagramTypeProvider().getDiagramEditor();;
+ TargetRuntime rt = editor.getTargetRuntime();
EObject object = getApplyObject(context);
if (object!=null) {
- BPMN2Editor editor = (BPMN2Editor)getDiagramTypeProvider().getDiagramEditor();;
- TargetRuntime rt = editor.getTargetRuntime();
FeatureContainerDescriptor fcd = rt.getFeatureContainer(object.eClass());
if (fcd!=null)
return fcd.getFeatureContainer();
}
- Object id = CustomShapeFeatureContainer.getId(context);
+ Object id = CustomElementFeatureContainer.getId(context);
for (IFeatureContainer container : containers.values()) {
if (id!=null && !(container instanceof ICustomElementFeatureContainer))
continue;
@@ -434,6 +437,14 @@ public class BPMN2FeatureProvider extends DefaultFeatureProvider implements IBpm
return container;
}
}
+ if (id!=null) {
+ for (CustomTaskDescriptor ct : rt.getCustomTaskDescriptors()) {
+ if (id.equals(ct.getId())) {
+ ICustomElementFeatureContainer container = (ICustomElementFeatureContainer)ct.getFeatureContainer();
+ return container;
+ }
+ }
+ }
// last chance: check custom task feature containers
if (id!=null && customTaskContainers!=null) {
IFeatureContainer container = customTaskContainers.get(id);
@@ -450,7 +461,7 @@ public class BPMN2FeatureProvider extends DefaultFeatureProvider implements IBpm
// problem during DIImport: the Custom Task feature containers are not added to
// the toolpalette until AFTER the file is loaded (in DIImport) and getAddFeature()
// is called during file loading.
- Object id = CustomShapeFeatureContainer.getId(context);
+ Object id = CustomElementFeatureContainer.getId(context);
if (id!=null) {
BPMN2Editor editor = (BPMN2Editor)getDiagramTypeProvider().getDiagramEditor();
TargetRuntime rt = editor.getTargetRuntime();
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
index e8af3b4f..3feac32d 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
@@ -505,24 +505,30 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
getTargetRuntime().notify(new LifecycleEvent(EventType.EDITOR_INITIALIZED,this));
if (otherEditor==null) {
- // Import the BPMNDI model that creates the Graphiti shapes, connections, etc.
- BasicCommandStack commandStack = (BasicCommandStack) getEditingDomain().getCommandStack();
- commandStack.execute(new RecordingCommand(getEditingDomain()) {
- @Override
- protected void doExecute() {
- importDiagram();
+ try {
+ getPreferences().setDoCoreValidation(false);
+ // Import the BPMNDI model that creates the Graphiti shapes, connections, etc.
+ BasicCommandStack commandStack = (BasicCommandStack) getEditingDomain().getCommandStack();
+ commandStack.execute(new RecordingCommand(getEditingDomain()) {
+ @Override
+ protected void doExecute() {
+ importDiagram();
+ }
+ });
+
+ Definitions definitions = ModelUtil.getDefinitions(bpmnResource);
+ if (definitions!=null) {
+ // we'll need this in case doSaveAs()
+ ((Bpmn2DiagramEditorInput)input).setTargetNamespace(definitions.getTargetNamespace());
+ ((Bpmn2DiagramEditorInput)input).setInitialDiagramType(ModelUtil.getDiagramType(this));
}
- });
-
- Definitions definitions = ModelUtil.getDefinitions(bpmnResource);
- if (definitions!=null) {
- // we'll need this in case doSaveAs()
- ((Bpmn2DiagramEditorInput)input).setTargetNamespace(definitions.getTargetNamespace());
- ((Bpmn2DiagramEditorInput)input).setInitialDiagramType(ModelUtil.getDiagramType(this));
+ // Reset the save point and initialize the undo stack
+ commandStack.saveIsDone();
+ commandStack.flush();
+ }
+ finally {
+ getPreferences().setDoCoreValidation(true);
}
- // Reset the save point and initialize the undo stack
- commandStack.saveIsDone();
- commandStack.flush();
}
// Load error markers
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java
index 44dd2366..99f05f57 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java
@@ -42,9 +42,11 @@ public class SubProcessPropertySection extends DefaultPropertySection {
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
- EObject bo = getBusinessObjectForSelection(selection);
- if (bo.eClass().getName().equals("SubProcess")) //$NON-NLS-1$
- return true;
+ if (super.appliesTo(part, selection)) {
+ EObject bo = getBusinessObjectForSelection(selection);
+ if (bo.eClass().getName().equals("SubProcess")) //$NON-NLS-1$
+ return true;
+ }
return false;
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java
index 0db0b92a..40ed4598 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java
@@ -314,9 +314,20 @@ public class MessageFlowFeatureContainer extends BaseElementConnectionFeatureCon
if (context instanceof IAddConnectionContext) {
IAddConnectionContext acc = (IAddConnectionContext) context;
if (acc.getSourceAnchor() != null) {
- Object obj = BusinessObjectUtil.getFirstElementOfType(acc.getSourceAnchor().getParent(),
- BaseElement.class);
- if (obj instanceof StartEvent) {
+ PictogramElement pe = acc.getSourceAnchor().getParent();
+ Object source = BusinessObjectUtil.getFirstElementOfType(pe, BaseElement.class);
+ if (source instanceof EndEvent) {
+ // End Events can only be the source of Message Flow connections
+ // if the End Event has a Message Event Definition
+ List<EventDefinition> eventDefinitions = ((EndEvent) source).getEventDefinitions();
+ for (EventDefinition eventDefinition : eventDefinitions) {
+ if (eventDefinition instanceof MessageEventDefinition) {
+ return true;
+ }
+ }
+ return false;
+ }
+ if (source instanceof StartEvent) {
return false;
}
}
@@ -408,6 +419,20 @@ public class MessageFlowFeatureContainer extends BaseElementConnectionFeatureCon
return false;
}
InteractionNode source = getSourceBo(context);
+ // Special case for End Event: only allow Message Flows if the End Event
+ // has a Message Event Definition.
+ if (source instanceof EndEvent) {
+ boolean allow = false;
+ List<EventDefinition> eventDefinitions = ((EndEvent) source).getEventDefinitions();
+ for (EventDefinition eventDefinition : eventDefinitions) {
+ if (eventDefinition instanceof MessageEventDefinition) {
+ allow = true;
+ break;
+ }
+ }
+ if (!allow)
+ return false;
+ }
InteractionNode target = getTargetBo(context);
return super.canCreate(context) && isDifferentParticipants(source, target);
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java
index fa9a6cac..02301c31 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java
@@ -12,12 +12,9 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property;
-import org.eclipse.bpmn2.di.impl.BPMNDiagramImpl;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbenchPart;
@@ -37,21 +34,13 @@ public class AdvancedPropertySection extends DefaultPropertySection {
}
@Override
- public EObject getBusinessObjectForSelection(ISelection selection) {
- EObject be = super.getBusinessObjectForSelection(selection);
- if (be instanceof BPMNDiagramImpl) {
- be = ModelUtil.getDefinitions(be);
- }
- return be;
- }
-
- @Override
public boolean shouldUseExtraSpace() {
return false;
}
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
+ super.appliesTo(part, selection); // set DiagramEditor as a side effect
BPMN2Editor editor = (BPMN2Editor)part.getAdapter(BPMN2Editor.class);
if (editor!=null)
return editor.getPreferences().getShowAdvancedPropertiesTab();
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java
index 4d821074..09c6c68b 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java
@@ -126,7 +126,7 @@ public class DescriptionPropertySection extends DefaultPropertySection implement
if (Bpmn2Preferences.getInstance(be).getShowDescriptions()) {
String description = getDescription(be);
- if (description != null) {
+ if (description != null && !description.isEmpty()) {
descriptionText = createDescription(this, description);
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java
index 6192da39..6a3a2a2a 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java
@@ -17,12 +17,11 @@ import java.util.List;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.CallableElement;
+import org.eclipse.bpmn2.Choreography;
import org.eclipse.bpmn2.Collaboration;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.Interface;
import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.Process;
-import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite;
@@ -73,16 +72,11 @@ public class InterfacePropertySection extends DefaultPropertySection {
@Override
public EObject getBusinessObjectForSelection(ISelection selection) {
EObject bo = super.getBusinessObjectForSelection(selection);
- if (bo instanceof BPMNDiagram) {
- BaseElement be = ((BPMNDiagram)bo).getPlane().getBpmnElement();
- if (be instanceof Collaboration)
- return be;
- if (be instanceof Process)
- return be;
- } else if (bo instanceof CallableElement) {
- return bo;
- }
- else if (bo instanceof Interface) {
+ if (
+ bo instanceof CallableElement || // includes Process
+ bo instanceof Interface ||
+ bo instanceof Collaboration // includes Choreography
+ ) {
return bo;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/CollaborationDiagramPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/CollaborationDiagramPropertySection.java
new file mode 100644
index 00000000..7818e0e8
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/CollaborationDiagramPropertySection.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.property.diagrams;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Composite;
+
+public class CollaborationDiagramPropertySection extends DefaultPropertySection {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2PropertySection#
+ * createSectionRoot()
+ */
+ @Override
+ protected AbstractDetailComposite createSectionRoot() {
+ return new DefaultDetailComposite(this);
+ }
+
+ @Override
+ public AbstractDetailComposite createSectionRoot(Composite parent, int style) {
+ return new DefaultDetailComposite(parent,style);
+ }
+
+ @Override
+ public EObject getBusinessObjectForSelection(ISelection selection) {
+ EObject bo = super.getBusinessObjectForSelection(selection);
+ // check class name instead of using instanceof to distinguish it
+ // from a Choreography which is a subclass of Collaboration.
+ if (bo!=null && bo.eClass().getName().equals("Collaboration"))
+ return bo;
+
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java
index 90dc4285..8eacfca3 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java
@@ -12,13 +12,12 @@ package org.eclipse.bpmn2.modeler.ui.property.diagrams;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
-import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPart;
public class DataItemsPropertySection extends DefaultPropertySection {
@@ -31,18 +30,14 @@ public class DataItemsPropertySection extends DefaultPropertySection {
}
@Override
- public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
- if (super.appliesTo(part, selection)) {
- return getBusinessObjectForSelection(selection) != null;
- }
- return false;
- }
-
- @Override
public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
- if (be instanceof Participant || be instanceof Process || be instanceof BPMNDiagram)
+ if (
+ be instanceof Participant ||
+ be instanceof Process
+ ) {
return ModelUtil.getDefinitions(be);
+ }
return null;
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java
index cf5671d7..da7d0116 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.diagrams;
+import org.eclipse.bpmn2.Process;
+import org.eclipse.bpmn2.Collaboration;
+import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
@@ -35,6 +38,13 @@ public class DefinitionsPropertySection extends DefaultPropertySection {
@Override
public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
- return ModelUtil.getDefinitions(be);
+ if (
+ be instanceof Participant ||
+ be instanceof Process ||
+ be instanceof Collaboration // includes Choreography
+ ) {
+ return ModelUtil.getDefinitions(be);
+ }
+ return null;
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java
index 6e76897a..41cab71c 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java
@@ -12,9 +12,6 @@ package org.eclipse.bpmn2.modeler.ui.property.diagrams;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.viewers.ISelection;
public class ParticipantPropertySection extends DefaultPropertySection {
@@ -25,10 +22,4 @@ public class ParticipantPropertySection extends DefaultPropertySection {
protected AbstractDetailComposite createSectionRoot() {
return new ParticipantDetailComposite(this);
}
-
- @Override
- public EObject getBusinessObjectForSelection(ISelection selection) {
- EObject be = super.getBusinessObjectForSelection(selection);
- return be;
- }
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java
index 23266aa2..d98ba2b3 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java
@@ -11,6 +11,7 @@
package org.eclipse.bpmn2.modeler.ui.property.diagrams;
import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
@@ -18,7 +19,6 @@ import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
public class ProcessDiagramPropertySection extends DefaultPropertySection {
@@ -41,24 +41,13 @@ public class ProcessDiagramPropertySection extends DefaultPropertySection {
@Override
public EObject getBusinessObjectForSelection(ISelection selection) {
EObject bo = super.getBusinessObjectForSelection(selection);
- if (bo instanceof BPMNDiagram) {
- BaseElement be = ((BPMNDiagram)bo).getPlane().getBpmnElement();
- if (be instanceof Process)
- return be;
- }
- else if (bo instanceof Process) {
+ if (bo instanceof Process) {
return bo;
}
+ else if (bo instanceof Participant) {
+ return ((Participant)bo).getProcessRef();
+ }
return null;
}
-
- @Override
- public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
- if (super.appliesTo(part, selection)) {
- EObject bo = getBusinessObjectForSelection(selection);
- return bo!=null;
- }
- return false;
- }
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java
index b7a685d3..309eab3f 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java
@@ -20,7 +20,6 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
public class CommonEventPropertySection extends DefaultPropertySection implements ITabbedPropertyConstants {
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java
index bd9e689a..478f125b 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java
@@ -12,7 +12,7 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.events;
-import org.eclipse.bpmn2.EventDefinition;
+import org.eclipse.bpmn2.ConditionalEventDefinition;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
import org.eclipse.emf.ecore.EObject;
@@ -38,7 +38,7 @@ public class ConditionalEventDefinitionPropertySection extends DefaultPropertySe
@Override
public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
- if (be instanceof EventDefinition)
+ if (be instanceof ConditionalEventDefinition)
return be;
return null;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java
index a218a586..db6668cb 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java
@@ -12,7 +12,7 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.events;
-import org.eclipse.bpmn2.EventDefinition;
+import org.eclipse.bpmn2.TimerEventDefinition;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
import org.eclipse.emf.ecore.EObject;
@@ -38,7 +38,7 @@ public class TimerEventDefinitionPropertySection extends DefaultPropertySection
@Override
public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
- if (be instanceof EventDefinition)
+ if (be instanceof TimerEventDefinition)
return be;
return null;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java
index cdb1dc87..809c0c12 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java
@@ -40,16 +40,11 @@ public class IoParametersPropertySection extends DefaultPropertySection {
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
- if (!isModelObjectEnabled(Bpmn2Package.eINSTANCE.getInputOutputSpecification()))
- return false;
-
if (super.appliesTo(part, selection)) {
- EObject object = getBusinessObjectForSelection(selection);
-// if (object instanceof ServiceTask) {
-// if (((ServiceTask)object).getOperationRef()!=null)
-// return false;
-// }
- return object!=null;
+ if (isModelObjectEnabled(Bpmn2Package.eINSTANCE.getInputOutputSpecification())) {
+ EObject object = getBusinessObjectForSelection(selection);
+ return object!=null;
+ }
}
return false;
}

Back to the top