Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Brodt2015-02-12 12:06:43 -0500
committerBob Brodt2015-02-12 12:06:43 -0500
commitb210de67e04fc78ed28e2804d569ac1de8a28e8a (patch)
tree2a3708cf620319527a85ea0629117ad69a46fdf7
parentd6ce07a447daa3d66fd24aaa18a9c428983b6cb8 (diff)
downloadorg.eclipse.bpmn2-modeler-b210de67e04fc78ed28e2804d569ac1de8a28e8a.tar.gz
org.eclipse.bpmn2-modeler-b210de67e04fc78ed28e2804d569ac1de8a28e8a.tar.xz
org.eclipse.bpmn2-modeler-b210de67e04fc78ed28e2804d569ac1de8a28e8a.zip
https://bugzilla.redhat.com/show_bug.cgi?id=1189454 - Multiple-Instance
Loop Characteristics and process variables are not linked. Also Eclipse Bug 459209 https://bugzilla.redhat.com/show_bug.cgi?id=1190727 - Target and sources for Intermediate Link Events. Also Eclipse Bug 459466
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java15
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml2
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java22
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter.java34
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java3
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java74
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java8
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java4
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java16
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java5
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties11
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java30
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/LinkEventDefinitionDetailComposite.java65
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/LinkEventDefinitionPropertySection.java45
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java14
15 files changed, 282 insertions, 66 deletions
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java
index 8ee56987..82d81290 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java
+++ b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java
@@ -13,7 +13,6 @@
package org.eclipse.bpmn2.modeler.core.adapters;
-import java.io.IOException;
import java.util.Collection;
import java.util.Hashtable;
import java.util.Iterator;
@@ -21,11 +20,12 @@ import java.util.List;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.RootElement;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -170,8 +170,17 @@ public class FeatureDescriptor<T extends EObject> extends ObjectDescriptor<T> {
// fallback is to do our own search
}
- if (values==null)
+ if (values==null) {
+ if (feature.getEType() instanceof EEnum) {
+ EEnum en = (EEnum) feature.getEType();
+ Hashtable<String, Object> choices = new Hashtable<String, Object>();
+ for (EEnumLiteral el : en.getELiterals()) {
+ choices.put(el.getLiteral(), el.getInstance());
+ }
+ return choices;
+ }
values = ModelUtil.getAllReachableObjects(object, feature);
+ }
if (values!=null) {
Hashtable<String,Object> choices = new Hashtable<String,Object>();
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml
index 9ea87007..91a724e1 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml
+++ b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml
@@ -818,7 +818,7 @@
<enable object="IntermediateCatchEvent" feature="eventDefinitions"/>
<enable object="IntermediateCatchEvent" feature="name"/>
<enable object="IntermediateThrowEvent" feature="eventDefinitions"/>
- <enable object="IntermediateThrowEvent" feature="inputSet"/>
+ <enable object="IntermediateThrowEvent" feature="dataInputs"/>
<enable object="IntermediateThrowEvent" feature="name"/>
<enable object="ItemAwareElement" feature="documentation"/>
<enable object="ItemAwareElement" feature="extensionDefinitions"/>
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java
index 7c61c17c..8d96f354 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java
+++ b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java
@@ -21,16 +21,19 @@ import org.eclipse.bpmn2.DataInput;
import org.eclipse.bpmn2.DataOutput;
import org.eclipse.bpmn2.Event;
import org.eclipse.bpmn2.EventDefinition;
+import org.eclipse.bpmn2.LinkEventDefinition;
import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.TimerEventDefinition;
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;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
+import org.eclipse.bpmn2.modeler.core.utils.EventDefinitionsUtil;
import org.eclipse.bpmn2.modeler.ui.property.editors.ExpressionLanguageObjectEditor;
import org.eclipse.bpmn2.modeler.ui.property.events.CommonEventDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.ConditionalEventDefinitionDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.EventDefinitionsListComposite;
+import org.eclipse.bpmn2.modeler.ui.property.events.LinkEventDefinitionDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.TimerEventDefinitionDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.tasks.DataAssociationDetailComposite.MapType;
import org.eclipse.emf.ecore.EClass;
@@ -74,6 +77,9 @@ public class JbpmCommonEventDetailComposite extends CommonEventDetailComposite {
if (eClass==ConditionalEventDefinition.class){
return new ConditionalEventDefinitionDetailComposite(parent, style);
}
+ if (eClass==LinkEventDefinition.class){
+ return new LinkEventDefinitionDetailComposite(parent, style);
+ }
EventDefinitionsDetailComposite details = new EventDefinitionsDetailComposite(parent, (Event)getBusinessObject()) {
@Override
public void createBindings(EObject be) {
@@ -119,7 +125,21 @@ public class JbpmCommonEventDetailComposite extends CommonEventDetailComposite {
eventsTable.setTitle(Messages.JbpmCommonEventDetailComposite_Title);
return eventsTable;
}
- return super.bindList(object, feature, listItemClass);
+ else if ("dataInputs".equals(feature.getName()) || "dataOutputs".equals(feature.getName())) { //$NON-NLS-1$
+ // only show Input/Output list if the event definition requires it
+ List<EventDefinition> eventDefinitions = null;
+ if (object instanceof ThrowEvent)
+ eventDefinitions = ((ThrowEvent)object).getEventDefinitions();
+ else if (object instanceof CatchEvent)
+ eventDefinitions = ((CatchEvent)object).getEventDefinitions();
+ if (eventDefinitions.size()>0) {
+ if (EventDefinitionsUtil.hasItemDefinition(eventDefinitions.get(0))) {
+ super.bindList(object, feature, listItemClass);
+ }
+ }
+ }
+ else
+ return super.bindList(object, feature, listItemClass);
}
return null;
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter.java b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter.java
index 7fe7caa5..91f31b33 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter.java
+++ b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter.java
@@ -10,11 +10,17 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.adapters;
+import java.util.Hashtable;
+
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.MultiInstanceLoopCharacteristics;
+import org.eclipse.bpmn2.Process;
+import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.JavaVariableNameObjectEditor;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.MultiInstanceLoopCharacteristicsPropertiesAdapter;
import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
public class JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter extends MultiInstanceLoopCharacteristicsPropertiesAdapter {
@@ -27,6 +33,34 @@ public class JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter extends Multi
feature = Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_OutputDataItem();
setProperty(feature, UI_OBJECT_EDITOR_CLASS, JavaVariableNameObjectEditor.class);
+
+ setFeatureDescriptor(LOOP_DATA_INPUT_REF, new LoopCharacteristicsDataIoFeatureDescriptor(this.adapterFactory, object, LOOP_DATA_INPUT_REF) {
+ public Hashtable<String, Object> getChoiceOfValues() {
+ Hashtable<String, Object> choices = new Hashtable<String, Object>();
+ EObject container = ModelUtil.getContainer(object);
+ if (container instanceof SubProcess) {
+ // get the Property instances (a.k.a. "local variables") of the containing Process or SubProcess
+ for (EObject p : ModelUtil.collectAncestorObjects(object, "properties", new Class[] {Process.class, SubProcess.class})) {
+ choices.put( getChoiceString(p), p);
+ }
+ }
+ return choices;
+ }
+ });
+
+ setFeatureDescriptor(LOOP_DATA_OUTPUT_REF, new LoopCharacteristicsDataIoFeatureDescriptor(this.adapterFactory, object, LOOP_DATA_OUTPUT_REF) {
+ public Hashtable<String, Object> getChoiceOfValues() {
+ Hashtable<String, Object> choices = new Hashtable<String, Object>();
+ EObject container = ModelUtil.getContainer(object);
+ if (container instanceof SubProcess) {
+ // get the Property instances (a.k.a. "local variables") of the containing Process or SubProcess
+ for (EObject p : ModelUtil.collectAncestorObjects(object, "properties", new Class[] {Process.class, SubProcess.class})) {
+ choices.put( getChoiceString(p), p);
+ }
+ }
+ return choices;
+ }
+ });
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java
index 73623e37..5f4b6b1f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java
@@ -185,7 +185,8 @@ public class Messages extends NLS {
public static String UI_SequenceFlow_long_description;
public static String UI_MessageFlow_long_description;
public static String UI_Association_long_description;
- public static String UI_Annotation_long_description;
+ public static String UI_DataInputAssociation_long_description;
+ public static String UI_DataOutputAssociation_long_description;
public static String UI_Task_long_description;
public static String UI_ManualTask_long_description;
public static String UI_UserTask_long_description;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java
index 89238e4b..160370a5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java
@@ -18,9 +18,13 @@ import java.util.List;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Definitions;
-import org.eclipse.bpmn2.ItemDefinition;
+import org.eclipse.bpmn2.Event;
+import org.eclipse.bpmn2.IntermediateCatchEvent;
+import org.eclipse.bpmn2.IntermediateThrowEvent;
import org.eclipse.bpmn2.LinkEventDefinition;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -39,48 +43,80 @@ public class LinkEventDefinitionPropertiesAdapter extends EventDefinitionPropert
super(adapterFactory, object);
setProperty(Bpmn2Package.eINSTANCE.getLinkEventDefinition_Source(), UI_CAN_CREATE_NEW, Boolean.FALSE);
- setProperty(Bpmn2Package.eINSTANCE.getLinkEventDefinition_Source(), UI_CAN_EDIT, Boolean.TRUE);
+ setProperty(Bpmn2Package.eINSTANCE.getLinkEventDefinition_Source(), UI_CAN_EDIT, Boolean.FALSE);
+ setProperty(Bpmn2Package.eINSTANCE.getLinkEventDefinition_Target(), UI_CAN_SET_NULL, Boolean.TRUE);
setProperty(Bpmn2Package.eINSTANCE.getLinkEventDefinition_Target(), UI_CAN_CREATE_NEW, Boolean.FALSE);
setProperty(Bpmn2Package.eINSTANCE.getLinkEventDefinition_Target(), UI_CAN_EDIT, Boolean.FALSE);
setProperty(Bpmn2Package.eINSTANCE.getLinkEventDefinition_Target(), UI_IS_MULTI_CHOICE, Boolean.TRUE);
- final EStructuralFeature ref = Bpmn2Package.eINSTANCE.getLinkEventDefinition_Target();
- setFeatureDescriptor(ref,
- new FeatureDescriptor<LinkEventDefinition>(adapterFactory,object,ref) {
+ EStructuralFeature feature = Bpmn2Package.eINSTANCE.getLinkEventDefinition_Target();
+ setFeatureDescriptor(feature, new FeatureDescriptor<LinkEventDefinition>(this.adapterFactory, object, feature) {
@Override
public String getDisplayName(Object context) {
- final LinkEventDefinition led = adopt(context);
- String name = led.getName();
- if (name==null || name.isEmpty())
- name = led.getId();
- return name;
+ return getLinkName(object);
}
@Override
public Hashtable<String, Object> getChoiceOfValues(Object context) {
LinkEventDefinition object = adopt(context);
// add all ItemDefinitions
- Hashtable<String,Object> choices = new Hashtable<String,Object>();
+ Hashtable<String, Object> choices = new Hashtable<String, Object>();
String s;
Definitions defs = ModelUtil.getDefinitions(object);
- List<LinkEventDefinition> links = (List)ModelUtil.getAllReachableObjects(defs, Bpmn2Package.eINSTANCE.getLinkEventDefinition());
+ Event thisEvent = getEvent(object);
+ List<LinkEventDefinition> links = (List) ModelUtil.getAllReachableObjects(defs,
+ Bpmn2Package.eINSTANCE.getLinkEventDefinition());
for (LinkEventDefinition link : links) {
- if (link!=object) {
- s = getDisplayName(link);
- choices.put(s,link);
+ if (link != object) {
+ Event thatEvent = getEvent(link);
+ if ( (thisEvent instanceof IntermediateCatchEvent && thatEvent instanceof IntermediateThrowEvent) ||
+ (thatEvent instanceof IntermediateCatchEvent && thisEvent instanceof IntermediateThrowEvent)) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(link);
+ s = adapter.getFeatureDescriptor(Bpmn2Package.eINSTANCE.getLinkEventDefinition_Source())
+ .getDisplayName(object);
+ choices.put(s, link);
+ }
}
}
return choices;
}
+ });
+ feature = Bpmn2Package.eINSTANCE.getLinkEventDefinition_Source();
+ setFeatureDescriptor(feature, new FeatureDescriptor<LinkEventDefinition>(this.adapterFactory, object, feature) {
+
+ @Override
+ public String getDisplayName(Object context) {
+ return getLinkName(object);
+ }
+ });
+
+ setObjectDescriptor(new ObjectDescriptor<LinkEventDefinition>(this.adapterFactory, object) {
+
@Override
- public String getChoiceString(Object value) {
- return super.getChoiceString(value);
+ public String getLabel(Object context) {
+ return getLinkName(object);
+ }
+ });
+ }
+
+ private static String getLinkName(LinkEventDefinition link) {
+ String eventName = ModelUtil.getDisplayName(getEvent(link));
+ String linkName = link.getName();
+ if (linkName==null || linkName.isEmpty())
+ linkName = link.getId();
+ return eventName + "/" + linkName; //$NON-NLS-1$
+ }
+
+ private static Event getEvent(LinkEventDefinition link) {
+ if (link.eContainer() instanceof Event) {
+ Event event = (Event) link.eContainer();
+ if (event instanceof IntermediateCatchEvent || event instanceof IntermediateThrowEvent) {
+ return event;
}
-
}
- );
+ return null;
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java
index e4c2f2c2..b5afb409 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java
@@ -43,10 +43,10 @@ import org.eclipse.emf.ecore.resource.Resource;
*/
public class MultiInstanceLoopCharacteristicsPropertiesAdapter extends ExtendedPropertiesAdapter<MultiInstanceLoopCharacteristics> {
- final static EStructuralFeature LOOP_DATA_INPUT_REF = Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_LoopDataInputRef();
- final static EStructuralFeature INPUT_DATA_ITEM = Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_InputDataItem();
- final static EStructuralFeature LOOP_DATA_OUTPUT_REF = Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_LoopDataOutputRef();
- final static EStructuralFeature OUTPUT_DATA_ITEM = Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_OutputDataItem();
+ protected final static EStructuralFeature LOOP_DATA_INPUT_REF = Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_LoopDataInputRef();
+ protected final static EStructuralFeature INPUT_DATA_ITEM = Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_InputDataItem();
+ protected final static EStructuralFeature LOOP_DATA_OUTPUT_REF = Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_LoopDataOutputRef();
+ protected final static EStructuralFeature OUTPUT_DATA_ITEM = Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_OutputDataItem();
/**
* @param adapterFactory
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
index 5b9ff4d2..1d605ef8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
@@ -142,6 +142,7 @@ import org.eclipse.bpmn2.modeler.ui.property.events.CommonEventDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.CommonEventPropertySection.EventDefinitionDialogComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.ConditionalEventDefinitionDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.EndEventDetailComposite;
+import org.eclipse.bpmn2.modeler.ui.property.events.LinkEventDefinitionDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.StartEventDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.ThrowEventDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.TimerEventDefinitionDetailComposite;
@@ -223,7 +224,6 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IPartListener2;
-import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchListener;
import org.eclipse.ui.IWorkbenchPage;
@@ -295,7 +295,7 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
PropertiesCompositeFactory.register(ConditionalEventDefinition.class, EventDefinitionDialogComposite.class);
PropertiesCompositeFactory.register(ErrorEventDefinition.class, EventDefinitionDialogComposite.class);
PropertiesCompositeFactory.register(EscalationEventDefinition.class, EventDefinitionDialogComposite.class);
- PropertiesCompositeFactory.register(LinkEventDefinition.class, EventDefinitionDialogComposite.class);
+ PropertiesCompositeFactory.register(LinkEventDefinition.class, LinkEventDefinitionDetailComposite.class);
PropertiesCompositeFactory.register(MessageEventDefinition.class, EventDefinitionDialogComposite.class);
PropertiesCompositeFactory.register(SignalEventDefinition.class, EventDefinitionDialogComposite.class);
PropertiesCompositeFactory.register(TimerEventDefinition.class, EventDefinitionDialogComposite.class);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java
index d4a8d438..084902b5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java
@@ -12,24 +12,12 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.flow;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
import org.eclipse.bpmn2.Activity;
-import org.eclipse.bpmn2.Artifact;
import org.eclipse.bpmn2.Association;
import org.eclipse.bpmn2.AssociationDirection;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.EndEvent;
-import org.eclipse.bpmn2.EventDefinition;
-import org.eclipse.bpmn2.FlowNode;
-import org.eclipse.bpmn2.MessageEventDefinition;
-import org.eclipse.bpmn2.SequenceFlow;
-import org.eclipse.bpmn2.StartEvent;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
import org.eclipse.bpmn2.modeler.core.features.BaseElementConnectionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractAddFlowFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractCreateFlowFeature;
@@ -38,12 +26,10 @@ import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateConnectionFeature;
-import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.IReconnectionFeature;
@@ -225,7 +211,7 @@ public class AssociationFeatureContainer extends BaseElementConnectionFeatureCon
if (source instanceof BoundaryEvent && target instanceof Activity)
return true;
- if (source instanceof Artifact || target instanceof Artifact)
+ if (source instanceof BaseElement || target instanceof BaseElement)
return true;
}
return false;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java
index 01349efb..8284d068 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java
@@ -29,6 +29,7 @@ import org.eclipse.bpmn2.InputOutputSpecification;
import org.eclipse.bpmn2.InputSet;
import org.eclipse.bpmn2.ItemAwareElement;
import org.eclipse.bpmn2.OutputSet;
+import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.di.BPMNEdge;
import org.eclipse.bpmn2.modeler.core.Activator;
@@ -224,7 +225,7 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
objectFeature = Bpmn2Package.eINSTANCE.getInputOutputSpecification_DataInputs();
targetFeature = Bpmn2Package.eINSTANCE.getActivity_DataInputAssociations();
}
- else if (target instanceof ThrowEvent) {
+ else if (target instanceof ThrowEvent || target instanceof SubProcess) {
object = target;
objectFeature = Bpmn2Package.eINSTANCE.getThrowEvent_DataInputs();
targetFeature = Bpmn2Package.eINSTANCE.getThrowEvent_DataInputAssociation();
@@ -292,7 +293,7 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
objectFeature = Bpmn2Package.eINSTANCE.getInputOutputSpecification_DataOutputs();
sourceFeature = Bpmn2Package.eINSTANCE.getActivity_DataOutputAssociations();
}
- else if (source instanceof CatchEvent) {
+ else if (source instanceof CatchEvent || source instanceof SubProcess) {
object = source;
objectFeature = Bpmn2Package.eINSTANCE.getCatchEvent_DataOutputs();
sourceFeature = Bpmn2Package.eINSTANCE.getCatchEvent_DataOutputAssociation();
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties
index 18d05447..24f4de67 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties
@@ -128,9 +128,10 @@ UI_MessageFlow_long_description = A Message Flow is used to show the flow of Mes
UI_Association_long_description = An Association is used to link information and Artifacts with BPMN graphical elements. \
Text Annotations and other Artifacts can be Associated with the graphical elements. An arrowhead on the Association indicates \
a direction of flow (e.g., data), when appropriate.
-UI_Annotation_long_description = Text Annotations are a mechanism for providing additional information to the reader of a BPMN Diagram. \
- The Text Annotation object can be connected to a specific object on the Diagram with an Association, but does not \
- affect the flow of the Process.
+UI_DataInputAssociation_long_description = Data Associations are used to link Data Objects with Activity inputs or outputs. \
+ An arrowhead indicates the direction of the flow of data.
+UI_DataOutputAssociation_long_description = Data Associations are used to link Data Objects with Activity inputs or outputs. \
+ An arrowhead indicates the direction of the flow of data.
UI_Task_long_description = A Task is an atomic Activity that is included within a Process. \
A Task is used when the work in the Process is not broken down to a finer level of Process detail.
@@ -252,7 +253,9 @@ UI_Group_long_description = The Group object is an Artifact that provides a visu
that a Group can stretch across the boundaries of a Pool to surround Diagram elements, often to \
identify Activities that exist within a distributed business-to-business transaction. \
Groups are often used to highlight certain sections of a Diagram and do not affect the flow of the Process.
-UI_TextAnnotation_long_description = Text Annotations provide additional information to the reader about a BPMN diagram.
+UI_TextAnnotation_long_description = Text Annotations are a mechanism for providing additional information to the reader of a BPMN Diagram. \
+ The Text Annotation object can be connected to a specific object on the Diagram with an Association, but does not \
+ affect the flow of the Process.
UI_Any_name_description = Descriptive name
UI_Documentation_text_description = Comments or other documentation about this activity.\n\
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java
index 313ae507..9dfeb998 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java
@@ -271,22 +271,28 @@ public class EventDefinitionsListComposite extends DefaultListComposite {
return ((EscalationEventDefinition)element).getEscalationRef().getName();
}
if (element instanceof LinkEventDefinition) {
- String text = "";
+ String text = ""; //$NON-NLS-1$
LinkEventDefinition link = (LinkEventDefinition)element;
- int size = link.getSource().size();
- for (int i=0; i<size; ++i) {
- LinkEventDefinition source = link.getSource().get(i);
- text += getTextValue(source.eContainer());
- if (i<size-1)
- text += ", ";
+ Event event = (Event) link.eContainer();
+ if (event instanceof CatchEvent) {
+ int size = link.getSource().size();
+ for (int i=0; i<size; ++i) {
+ LinkEventDefinition source = link.getSource().get(i);
+ text += getTextValue(source.eContainer());
+ if (i<size-1)
+ text += ", "; //$NON-NLS-1$
+ }
+ if (!text.isEmpty()) {
+ text += " -> "; //$NON-NLS-1$
+ text += getTextValue(link.eContainer());
+ return text;
+ }
}
- if (!text.isEmpty()) {
- text += " -> ";
+ else if (event instanceof ThrowEvent) {
text += getTextValue(link.eContainer());
+ text += " -> ";
LinkEventDefinition target = link.getTarget();
- if (target!=null) {
- text += " -> " + getTextValue(target.eContainer());
- }
+ text += getTextValue(target.eContainer());
return text;
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/LinkEventDefinitionDetailComposite.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/LinkEventDefinitionDetailComposite.java
new file mode 100644
index 00000000..62348935
--- /dev/null
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/LinkEventDefinitionDetailComposite.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * 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.ui.property.events;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.CatchEvent;
+import org.eclipse.bpmn2.Event;
+import org.eclipse.bpmn2.LinkEventDefinition;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author Bob Brodt
+ *
+ */
+public class LinkEventDefinitionDetailComposite extends DefaultDetailComposite {
+
+ /**
+ * @param parent
+ * @param style
+ */
+ public LinkEventDefinitionDetailComposite(Composite parent, int style) {
+ super(parent, style);
+ }
+
+ /**
+ * @param section
+ */
+ public LinkEventDefinitionDetailComposite(AbstractBpmn2PropertySection section) {
+ super(section);
+ }
+
+ @Override
+ public void cleanBindings() {
+ super.cleanBindings();
+ }
+
+ @Override
+ public void createBindings(EObject be) {
+ final LinkEventDefinition eventDefinition = (LinkEventDefinition)be;
+ if (eventDefinition.eContainer() instanceof Event) {
+ Event event = (Event) eventDefinition.eContainer();
+ this.bindAttribute(getAttributesParent(), eventDefinition, Bpmn2Package.eINSTANCE.getLinkEventDefinition_Name());
+ if (event instanceof CatchEvent) {
+ bindReference(eventDefinition, Bpmn2Package.eINSTANCE.getLinkEventDefinition_Source());
+ }
+ else {
+ bindReference(eventDefinition, Bpmn2Package.eINSTANCE.getLinkEventDefinition_Target());
+ }
+ }
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/LinkEventDefinitionPropertySection.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/LinkEventDefinitionPropertySection.java
new file mode 100644
index 00000000..2ff88bbd
--- /dev/null
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/LinkEventDefinitionPropertySection.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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 Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.property.events;
+
+import org.eclipse.bpmn2.LinkEventDefinition;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
+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.views.properties.tabbed.ITabbedPropertyConstants;
+
+public class LinkEventDefinitionPropertySection extends DefaultPropertySection implements ITabbedPropertyConstants {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2PropertySection#createSectionRoot()
+ */
+ @Override
+ protected AbstractDetailComposite createSectionRoot() {
+ return new LinkEventDefinitionDetailComposite(this);
+ }
+
+ @Override
+ public AbstractDetailComposite createSectionRoot(Composite parent, int style) {
+ return new LinkEventDefinitionDetailComposite(parent,style);
+ }
+
+ @Override
+ public EObject getBusinessObjectForSelection(ISelection selection) {
+ EObject be = super.getBusinessObjectForSelection(selection);
+ if (be instanceof LinkEventDefinition)
+ return be;
+ return null;
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java
index 0baa7c31..513da468 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java
@@ -634,7 +634,12 @@ public class MultiInstanceLoopCharacteristicsDetailComposite extends DefaultDeta
@Override
public void createBindings(EObject be) {
- ObjectEditor editor = new ComboObjectEditor(this,object,reference, PACKAGE.getDataInput());
+ ObjectEditor editor = new ComboObjectEditor(this,object,reference, PACKAGE.getDataInput()) {
+ @Override
+ protected boolean canCreateNew() {
+ return false;
+ }
+ };
editor.createControl(getAttributesParent(), Messages.MultiInstanceLoopCharacteristicsDetailComposite_Input_Data_Label);
DataInput input = lc.getInputDataItem();
if (input==null) {
@@ -656,7 +661,12 @@ public class MultiInstanceLoopCharacteristicsDetailComposite extends DefaultDeta
@Override
public void createBindings(EObject be) {
- ObjectEditor editor = new ComboObjectEditor(this,object,reference);
+ ObjectEditor editor = new ComboObjectEditor(this,object,reference){
+ @Override
+ protected boolean canCreateNew() {
+ return false;
+ }
+ };
editor.createControl(getAttributesParent(), Messages.MultiInstanceLoopCharacteristicsDetailComposite_Output_Data_Label);
DataOutput output = lc.getOutputDataItem();
if (output==null) {

Back to the top