Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrodt2014-07-31 10:56:46 -0400
committerrbrodt2014-07-31 10:56:46 -0400
commit845760253b19e4773b87225c98f0d26142ee0a74 (patch)
tree290c8f6b4ab46b1ee0f478d314123c674ee5e655
parent40d0a387f7167d8cbfd7284ebfdcbd0f22d909cb (diff)
downloadorg.eclipse.bpmn2-modeler-845760253b19e4773b87225c98f0d26142ee0a74.tar.gz
org.eclipse.bpmn2-modeler-845760253b19e4773b87225c98f0d26142ee0a74.tar.xz
org.eclipse.bpmn2-modeler-845760253b19e4773b87225c98f0d26142ee0a74.zip
Bug 440827 - Unable to remove participant process (whitebox)
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java9
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java20
5 files changed, 41 insertions, 18 deletions
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java
index 8703344c..19796eb2 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java
@@ -603,7 +603,7 @@ GraphicsUtil.debug = false;
}
if (route.isValid()){
- if (!calculateEnroute(route,p,end,Orientation.NONE))
+ if (!calculateEnroute(route,p,end,orientation))
return false;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties b/plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties
index 714f860f..719f3045 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties
@@ -56,7 +56,7 @@ 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.SubChoreography = Sub Choreography
propertyTab.label.Conversation = Conversation
propertyTab.label.Gateway = Gateway
propertyTab.label.Event = Event
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java
index 64920655..dd38b177 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java
@@ -14,11 +14,12 @@
package org.eclipse.bpmn2.modeler.ui.editor;
import java.util.ArrayList;
-import java.util.Hashtable;
import java.util.List;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.Bpmn2DiagramEditorInput;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -217,7 +218,11 @@ public class BPMN2MultiPageEditor extends MultiPageEditorPart implements IGotoMa
CTabItem oldItem = tabFolder.getItem(pageIndex-1);
CTabItem newItem = tabFolder.getItem(pageIndex);
newItem.setControl( oldItem.getControl() );
- setPageText(pageIndex,ExtendedPropertiesProvider.getTextValue(bpmnDiagram));
+ BaseElement bpmnElement = bpmnDiagram.getPlane().getBpmnElement();
+ String name = ModelUtil.getName(bpmnElement);
+ if (name==null)
+ name = ExtendedPropertiesProvider.getTextValue(bpmnDiagram);
+ setPageText(pageIndex,name);
setActivePage(pageIndex);
updateTabs();
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java
index edad9e85..0099e701 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java
@@ -22,6 +22,7 @@ import org.eclipse.bpmn2.FlowElement;
import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.di.BPMNPlane;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
@@ -393,14 +394,11 @@ public class DesignEditor extends BPMN2Editor {
@Override
protected boolean calculateEnabled() {
- BPMNDiagram bpmnDiagram = getBpmnDiagram();
+ final BPMNDiagram bpmnDiagram = getBpmnDiagram();
BPMNPlane plane = bpmnDiagram.getPlane();
- BaseElement process = plane.getBpmnElement();
- List<Participant> participants = getModelHandler().getAll(Participant.class);
- for (Participant p : participants) {
- if (p.getProcessRef() == process)
- return false;
- }
+ BaseElement bpmnElement = plane.getBpmnElement();
+ if (bpmnElement instanceof SubProcess)
+ return false;
return true;
}
@@ -554,12 +552,14 @@ public class DesignEditor extends BPMN2Editor {
}
for (int i=0; i<multipageEditor.getPageCount(); ++i) {
BPMNDiagram bpmnDiagram = multipageEditor.getBpmnDiagram(i);
- if (bpmnDiagram == notifier) {
- CTabItem item = multipageEditor.getTabItem(i);
- String text = n.getNewStringValue();
- if (text==null || text.isEmpty())
- text = "Unnamed"; //$NON-NLS-1$
- item.setText(text);
+ if (bpmnDiagram!=null) {
+ if (bpmnDiagram==notifier || bpmnDiagram.getPlane().getBpmnElement() == notifier) {
+ CTabItem item = multipageEditor.getTabItem(i);
+ String text = n.getNewStringValue();
+ if (text==null || text.isEmpty())
+ text = "Unnamed"; //$NON-NLS-1$
+ item.setText(text);
+ }
}
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java
index 0b2ce4e3..69229c36 100644
--- a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java
@@ -20,10 +20,15 @@ import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.CollapseFlowNodeFeature;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.ExpandFlowNodeFeature;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.PullupFeature;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.PushdownFeature;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.custom.ICustomFeature;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
public class SubChoreographyFeatureContainer extends AbstractChoreographyFeatureContainer {
@@ -58,7 +63,20 @@ public class SubChoreographyFeatureContainer extends AbstractChoreographyFeature
return multiUpdate;
}
-
+
+ @Override
+ public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
+ ICustomFeature[] superFeatures = super.getCustomFeatures(fp);
+ ICustomFeature[] thisFeatures = new ICustomFeature[4 + superFeatures.length];
+ thisFeatures[0] = new ExpandFlowNodeFeature(fp);
+ thisFeatures[1] = new CollapseFlowNodeFeature(fp);
+ thisFeatures[2] = new PushdownFeature(fp);
+ thisFeatures[3] = new PullupFeature(fp);
+ for (int i=0; i<superFeatures.length; ++i)
+ thisFeatures[4+i] = superFeatures[i];
+ return thisFeatures;
+ }
+
public static class CreateSubChoreographyFeature extends AbstractCreateChoreographyActivityFeature<SubChoreography> {
public CreateSubChoreographyFeature(IFeatureProvider fp) {

Back to the top