Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuan Cadavid2015-10-14 15:22:49 -0400
committerGerrit Code Review @ Eclipse.org2015-10-15 12:11:49 -0400
commit29b7fa982f12e768669225af4e7a16d47ad81e38 (patch)
treee44ff1b5d6b9174640ea1777812b68974b35906e /extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process
parent921454fb8472a123fa7bf96d0ccc1cdd7a90b4e3 (diff)
downloadorg.eclipse.papyrus-29b7fa982f12e768669225af4e7a16d47ad81e38.tar.gz
org.eclipse.papyrus-29b7fa982f12e768669225af4e7a16d47ad81e38.tar.xz
org.eclipse.papyrus-29b7fa982f12e768669225af4e7a16d47ad81e38.zip
BPMN lanes implementation
Signed-off-by: Juan Cadavid <juan.cadavid@cea.fr>
Diffstat (limited to 'extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process')
-rw-r--r--extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/META-INF/MANIFEST.MF36
-rw-r--r--extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/model/bpmnDiagramExpansion.xmi39
-rw-r--r--extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/model/process.elementtypesconfigurations24
-rw-r--r--extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/plugin.xml6
-rw-r--r--extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/src/org/eclipse/papyrus/bpmn/diagram/process/Activator.java11
-rw-r--r--extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/src/org/eclipse/papyrus/bpmn/diagram/process/ActivityViewFactory.java81
6 files changed, 179 insertions, 18 deletions
diff --git a/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/META-INF/MANIFEST.MF b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/META-INF/MANIFEST.MF
index 8fce31906aa..2a0130efdb3 100644
--- a/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/META-INF/MANIFEST.MF
+++ b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/META-INF/MANIFEST.MF
@@ -1,16 +1,20 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.bpmn.diagram.process
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.bpmn;bundle-version="0.7.0",
- org.eclipse.papyrus.bpmn.diagram.common;bundle-version="0.7.0",
- org.eclipse.papyrus.bpmn.diagram.ui;bundle-version="0.7.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="0.7.0"
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 0.7.0.qualifier
-Bundle-Name: %Bundle-Name
-Bundle-Activator: org.eclipse.papyrus.bpmn.diagram.process.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.bpmn.diagram.process;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.bpmn.diagram.process
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.bpmn;bundle-version="0.7.0",
+ org.eclipse.papyrus.bpmn.diagram.common;bundle-version="0.7.0",
+ org.eclipse.papyrus.bpmn.diagram.ui;bundle-version="0.7.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="0.7.0",
+ org.eclipse.gmf.runtime.notation.edit,
+ org.eclipse.gmf.runtime.diagram.core,
+ org.eclipse.papyrus.uml.diagram.activity,
+ org.eclipse.gmf.runtime.diagram.ui
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.7.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.bpmn.diagram.process.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.bpmn.diagram.process;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/model/bpmnDiagramExpansion.xmi b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/model/bpmnDiagramExpansion.xmi
new file mode 100644
index 00000000000..fea3a97391b
--- /dev/null
+++ b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/model/bpmnDiagramExpansion.xmi
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<expansionmodel:DiagramExpansion
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:expansionmodel="http:///expansionmodel.ecore"
+ xmi:id="_BOX98NnkEeSFtu511b-yaw"
+ ID="BPMN Process Diagram">
+ <usages xmi:id="_rC19oNnoEeSqwOe5_frWm1"
+ diagramType="BPMN Process Diagram"
+ representations="//@usages.0/@gmftRepresentations.0"
+ name="BPMN Process Diagram Context">
+ <gmftRepresentations
+ editPartQualifiedName="org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPart"
+ name="reuse activity"
+ viewFactory="org.eclipse.papyrus.bpmn.diagram.process.ActivityViewFactory"
+ inducedRepresentations="//@libraries.1/@representations.0"
+ reusedID="2001"/>
+ </usages>
+ <libraries
+ name="newRepresentation">
+ <representations
+ xsi:type="expansionmodel:Representation"
+ editPartQualifiedName="org.eclipse.papyrus.bpmn.diagram.common.edit.part.LaneEditPart"
+ name="Lane overloads activity partition"
+ viewFactory="org.eclipse.papyrus.bpmn.diagram.common.factory.LaneViewFactory"
+ graphicalElementType="org.eclipse.papyrus.bpmn.process.Lane_Partition"/>
+ </libraries>
+ <libraries
+ name="reusedCompartment">
+ <representations
+ xsi:type="expansionmodel:InducedRepresentation"
+ editPartQualifiedName="org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityContentCompartmentEditPart"
+ name="compartment of activity"
+ viewFactory="org.eclipse.gmf.runtime.diagram.ui.view.factories.optimal.CompartmentViewFactory"
+ hint="7004"
+ children="//@libraries.0/@representations.0"/>
+ </libraries>
+</expansionmodel:DiagramExpansion>
diff --git a/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/model/process.elementtypesconfigurations b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/model/process.elementtypesconfigurations
index a81bb8e1b14..7e9ba2229b9 100644
--- a/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/model/process.elementtypesconfigurations
+++ b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/model/process.elementtypesconfigurations
@@ -574,8 +574,28 @@
<specializedTypesID>org.eclipse.papyrus.bpmn.MultiInstanceLoopCharacteristics_StructuredActivityNode</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.activity.StructuredActivityNode_3065</specializedTypesID>
</elementTypeConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_s7USFwkGEeWVleXnap4Kwg" name="Apply Definitions" identifier="org.eclipse.papyrus.bpmn.process.definitions_PapyrusUMLActivityDiagram" target="_s7URSwkGEeWVleXnap4Kwg">
- <stereotypesToApply xmi:id="_s7USGAkGEeWVleXnap4Kwg" stereotypeQualifiedName="BPMNProfile::Definitions" updateName="true">
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_ODZj0BBDEeWXVJ4WhgYiRw"
+ name="Lane ActivityPartition"
+ identifier="org.eclipse.papyrus.bpmn.process.Lane_Partition"
+ hint="lane_partition">
+ <iconEntry
+ xmi:id="_ODZj0RBDEeWXVJ4WhgYiRw"
+ iconPath="/icons/full/obj16/ActivityPartition.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.bpmn.Lane_ActivityPartition</specializedTypesID>
+ </elementTypeConfigurations>
+ <adviceBindingsConfigurations
+ xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration"
+ xmi:id="_s7USFwkGEeWVleXnap4Kwg"
+ name="Apply Definitions"
+ identifier="org.eclipse.papyrus.bpmn.process.definitions_PapyrusUMLActivityDiagram"
+ target="_s7URSwkGEeWVleXnap4Kwg">
+ <stereotypesToApply
+ xmi:id="_s7USGAkGEeWVleXnap4Kwg"
+ stereotypeQualifiedName="BPMNProfile::Definitions"
+ updateName="true">
<requiredProfiles>BPMNProfile</requiredProfiles>
</stereotypesToApply>
</adviceBindingsConfigurations>
diff --git a/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/plugin.xml b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/plugin.xml
index b608512daea..5177338ec46 100644
--- a/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/plugin.xml
+++ b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/plugin.xml
@@ -25,4 +25,10 @@
</editor>
</paletteDefinition>
</extension>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.diagramExpansion">
+ <diagramexpansion
+ model="model/bpmnDiagramExpansion.xmi">
+ </diagramexpansion>
+ </extension>
</plugin>
diff --git a/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/src/org/eclipse/papyrus/bpmn/diagram/process/Activator.java b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/src/org/eclipse/papyrus/bpmn/diagram/process/Activator.java
index 4e12fe04b07..33917921be0 100644
--- a/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/src/org/eclipse/papyrus/bpmn/diagram/process/Activator.java
+++ b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/src/org/eclipse/papyrus/bpmn/diagram/process/Activator.java
@@ -1,3 +1,14 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
package org.eclipse.papyrus.bpmn.diagram.process;
import org.eclipse.ui.plugin.AbstractUIPlugin;
diff --git a/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/src/org/eclipse/papyrus/bpmn/diagram/process/ActivityViewFactory.java b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/src/org/eclipse/papyrus/bpmn/diagram/process/ActivityViewFactory.java
new file mode 100644
index 00000000000..cacbe4cf276
--- /dev/null
+++ b/extraplugins/bpmn/org.eclipse.papyrus.bpmn.diagram.process/src/org/eclipse/papyrus/bpmn/diagram/process/ActivityViewFactory.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.bpmn.diagram.process;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.TitleStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityParametersCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityPostConditionsCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityPreConditionsCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityIsSingleExecutionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityNameEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+
+public class ActivityViewFactory extends AbstractShapeViewFactory{
+ protected Node createNode() {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType("2001");
+ // initializeFromPreferences
+ Node label5001 = createLabel(node, UMLVisualIDRegistry.getType(ActivityNameEditPart.VISUAL_ID));
+ Node label5002 = createLabel(node, UMLVisualIDRegistry.getType(ActivityIsSingleExecutionEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityParametersCompartmentEditPart.VISUAL_ID), false, false, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ return node;
+ }
+ /**
+ * @generated
+ */
+ protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
+ // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
+ // rv.setShowTitle(showTitle);
+ // rv.setCollapsed(isCollapsed);
+ Node rv;
+ if (canCollapse) {
+ rv = NotationFactory.eINSTANCE.createBasicCompartment();
+ } else {
+ rv = NotationFactory.eINSTANCE.createDecorationNode();
+ }
+ rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ if (hasTitle) {
+ TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
+ rv.getStyles().add(ts);
+ }
+ if (canSort) {
+ rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle());
+ }
+ if (canFilter) {
+ rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle());
+ }
+ rv.setType(hint);
+ ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
+ return rv;
+ }
+ /**
+ * @generated
+ */
+ protected Node createLabel(View owner, String hint) {
+ DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
+ rv.setType(hint);
+ ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
+ return rv;
+ }
+}

Back to the top