Author: koen.aers(a)jboss.com
Date: 2010-11-22 05:05:24 -0500 (Mon, 22 Nov 2010)
New Revision: 26816
Added:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/icons/obj16/jbpm_icon_16.png
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnBendpointsImpl.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnBoundsImpl.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnDiagramImpl.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnEdgeImpl.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnLabelImpl.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnNotationFactory.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnShapeImpl.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/util/
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/util/Bpmn2ResourceFactoryImpl.java
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/META-INF/MANIFEST.MF
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/plugin.properties
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/plugin.xml
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/navigator/Bpmn2NavigatorContentProvider.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/navigator/Bpmn2NavigatorLabelProvider.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2CreationWizard.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2DiagramEditorUtil.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2InitDiagramFileAction.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2NewDiagramFileWizard.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2UriEditorInputTester.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2VisualIDRegistry.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Messages.java
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/providers/Bpmn2ViewProvider.java
Log:
before template changes
Modified: trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/META-INF/MANIFEST.MF
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/META-INF/MANIFEST.MF 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/META-INF/MANIFEST.MF 2010-11-22
10:05:24 UTC (rev 26816)
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.jboss.tools.bpmn2.process.diagram; singleton:=true
+Bundle-SymbolicName: org.eclipse.bpmn2.diagram; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.jboss.tools.bpmn2.process.diagram.part.Bpmn2DiagramEditorPlugin
@@ -36,6 +36,7 @@
org.eclipse.bpmn2;visibility:=reexport,
org.eclipse.bpmn2.edit;visibility:=reexport,
org.eclipse.gef;visibility:=reexport,
- org.eclipse.jdt.ui;bundle-version="3.6.0"
+ org.eclipse.jdt.ui;bundle-version="3.6.0",
+ org.eclipse.ocl.ecore;visibility:=reexport
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/icons/obj16/jbpm_icon_16.png
===================================================================
(Binary files differ)
Property changes on:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/icons/obj16/jbpm_icon_16.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/plugin.properties
===================================================================
--- trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/plugin.properties 2010-11-22
09:34:38 UTC (rev 26815)
+++ trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/plugin.properties 2010-11-22
10:05:24 UTC (rev 26816)
@@ -4,7 +4,7 @@
editorName=bpmn2 Diagram Editing
context.description=bpmn2 Diagram Editing
context.name=In bpmn2 Diagram Editor
-newWizardName=bpmn2 Diagram
+newWizardName=BPMN2 Diagram
newWizardDesc=Creates bpmn2 diagram.
initDiagramActionLabel=Initialize prd diagram file
Modified: trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/plugin.xml
===================================================================
--- trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/plugin.xml 2010-11-22
09:34:38 UTC (rev 26815)
+++ trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/plugin.xml 2010-11-22
10:05:24 UTC (rev 26816)
@@ -4,7 +4,7 @@
<extension point="org.eclipse.team.core.fileTypes"
id="repo-ftype">
<?gmfgen generated="true"?>
- <fileTypes type="text" extension="prd"/>
+ <fileTypes type="text" extension="jbpmn"/>
</extension>
<extension point="org.eclipse.emf.ecore.extension_parser"
id="resource-factory">
@@ -15,13 +15,19 @@
</parser>
</extension>
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ type="jbpmn"
+ class="org.jboss.tools.bpmn2.util.Bpmn2ResourceFactoryImpl"/>
+ </extension>
+
<extension point="org.eclipse.ui.editors" id="gmf-editor">
- <?gmfgen generated="true"?>
+ <?gmfgen generated="false"?>
<editor
id="org.jboss.tools.bpmn2.process.diagram.part.Bpmn2DiagramEditorID"
name="%editorName"
- icon="icons/obj16/Bpmn2DiagramFile.gif"
- extensions="prd"
+ icon="icons/obj16/jbpm_icon_16.png"
+ extensions="jbpmn"
default="true"
class="org.jboss.tools.bpmn2.process.diagram.part.Bpmn2DiagramEditor"
matchingStrategy="org.jboss.tools.bpmn2.process.diagram.part.Bpmn2MatchingStrategy"
@@ -40,22 +46,26 @@
</extension>
<extension point="org.eclipse.ui.newWizards"
id="creation-wizard">
- <?gmfgen generated="true"?>
+ <?gmfgen generated="false"?>
<wizard
name="%newWizardName"
- icon="icons/obj16/Bpmn2DiagramFile.gif"
- category="org.eclipse.ui.Examples"
+ icon="icons/obj16/jbpm_icon_16.png"
+ category="org.jboss.tools.jbpm"
class="org.jboss.tools.bpmn2.process.diagram.part.Bpmn2CreationWizard"
id="org.jboss.tools.bpmn2.process.diagram.part.Bpmn2CreationWizardID">
<description>%newWizardDesc</description>
</wizard>
+ <category
+ id="org.jboss.tools.jbpm"
+ name="jBPM">
+ </category>
</extension>
<extension point="org.eclipse.ui.popupMenus"
id="init-diagram-action">
<?gmfgen generated="true"?>
<objectContribution
id="org.eclipse.bpmn2.diagram.InitDiagram"
- nameFilter="*.bpmn2"
+ nameFilter="*.jbpmn"
objectClass="org.eclipse.core.resources.IFile">
<action
label="%initDiagramActionLabel"
@@ -714,7 +724,7 @@
<or>
<and>
<instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension"
value="prd"/>
+ <test property="org.eclipse.core.resources.extension"
value="jbpmn"/>
</and>
<instanceof
value="org.jboss.tools.bpmn2.process.diagram.navigator.Bpmn2AbstractNavigatorItem"/>
</or>
@@ -731,7 +741,7 @@
<or>
<and>
<instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension"
value="prd"/>
+ <test property="org.eclipse.core.resources.extension"
value="jbpmn"/>
</and>
<instanceof
value="org.jboss.tools.bpmn2.process.diagram.navigator.Bpmn2AbstractNavigatorItem"/>
</or>
@@ -750,7 +760,7 @@
<or>
<and>
<instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension"
value="bpmn2"/>
+ <test property="org.eclipse.core.resources.extension"
value="jbpmn"/>
</and>
<instanceof
value="org.jboss.tools.bpmn2.process.diagram.navigator.Bpmn2DomainNavigatorItem"/>
</or>
@@ -837,6 +847,16 @@
<extension point="org.eclipse.ui.handlers"
id="menu-handlers">
<?gmfgen generated="true"?>
</extension>
+
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.jdt.ui.JavaPerspective">
+ <newWizardShortcut
+
id="org.jboss.tools.bpmn2.process.diagram.part.Bpmn2CreationWizardID">
+ </newWizardShortcut>
+ </perspectiveExtension>
+ </extension>
<!-- optionally, specify keybindings -->
</plugin>
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/navigator/Bpmn2NavigatorContentProvider.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/navigator/Bpmn2NavigatorContentProvider.java 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/navigator/Bpmn2NavigatorContentProvider.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -251,112 +251,14 @@
private Object[] getViewChildren(View view, Object parentElement) {
switch (Bpmn2VisualIDRegistry.getVisualID(view)) {
- case ProcessEditPart.VISUAL_ID: {
+ case EndEventEditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Diagram sv = (Diagram) view;
- Bpmn2NavigatorGroup links = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_Process_1000_links,
- "icons/linksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(UserTaskEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(ServiceTaskEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(StartEventEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(StartEvent2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(EndEventEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(ExclusiveGatewayEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(ParallelGatewayEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(EndEvent2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(EndEvent3EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(IntermediateCatchEventEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(IntermediateThrowEventEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(IntermediateCatchEvent2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(IntermediateCatchEvent3EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(DataObjectEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(TextAnnotationEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(SubProcessEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(ScriptTaskEditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getDiagramLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- connectedViews = getDiagramLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- links.addChildren(createNavigatorItems(connectedViews, links, false));
- if (!links.isEmpty()) {
- result.add(links);
- }
- return result.toArray();
- }
-
- case EndEvent2EditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_EndEvent_2008_incominglinks,
+ Messages.NavigatorGroupName_EndEvent_2004_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_EndEvent_2008_outgoinglinks,
+ Messages.NavigatorGroupName_EndEvent_2004_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -388,14 +290,14 @@
return result.toArray();
}
- case ExclusiveGatewayEditPart.VISUAL_ID: {
+ case ParallelGatewayEditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ExclusiveGateway_2005_incominglinks,
+ Messages.NavigatorGroupName_ParallelGateway_2006_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ExclusiveGateway_2005_outgoinglinks,
+ Messages.NavigatorGroupName_ParallelGateway_2006_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -427,14 +329,14 @@
return result.toArray();
}
- case ScriptTask2EditPart.VISUAL_ID: {
+ case EndEvent5EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ScriptTask_3016_incominglinks,
+ Messages.NavigatorGroupName_EndEvent_3009_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ScriptTask_3016_outgoinglinks,
+ Messages.NavigatorGroupName_EndEvent_3009_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -466,133 +368,97 @@
return result.toArray();
}
- case StartEvent3EditPart.VISUAL_ID: {
+ case SubProcessEditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_StartEvent_3003_incominglinks,
+ Messages.NavigatorGroupName_SubProcess_2016_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_StartEvent_3003_outgoinglinks,
+ Messages.NavigatorGroupName_SubProcess_2016_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(SubProcess2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(UserTask2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(ServiceTask2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(StartEvent3EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- case EndEvent3EditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_EndEvent_2009_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_EndEvent_2009_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(StartEvent4EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(EndEvent4EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(ExclusiveGateway2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(ParallelGateway2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(EndEvent5EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(EndEvent6EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateCatchEvent4EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- case EndEventEditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_EndEvent_2004_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_EndEvent_2004_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateThrowEvent2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateCatchEvent5EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateCatchEvent4EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(DataObject2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- case IntermediateThrowEvent2EditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateThrowEvent_3012_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateThrowEvent_3012_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
+ .getType(TextAnnotation2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(ScriptTask2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
.getType(SequenceFlowEditPart.VISUAL_ID));
@@ -622,123 +488,97 @@
return result.toArray();
}
- case IntermediateThrowEventEditPart.VISUAL_ID: {
+ case SubProcess2EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateThrowEvent_2011_incominglinks,
+ Messages.NavigatorGroupName_SubProcess_3001_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateThrowEvent_2011_outgoinglinks,
+ Messages.NavigatorGroupName_SubProcess_3001_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(SubProcess2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(UserTask2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(ServiceTask2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(StartEvent3EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- case TextAnnotation2EditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_TextAnnotation_3015_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_TextAnnotation_3015_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(StartEvent4EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(EndEvent4EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(ExclusiveGateway2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- case EndEvent5EditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_EndEvent_3009_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_EndEvent_3009_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(ParallelGateway2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(EndEvent5EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(EndEvent6EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateCatchEvent4EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateThrowEvent2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateCatchEvent5EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- case ServiceTaskEditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ServiceTask_2002_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ServiceTask_2002_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
+ .getType(IntermediateCatchEvent4EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(DataObject2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(TextAnnotation2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(ScriptTask2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
.getType(SequenceFlowEditPart.VISUAL_ID));
@@ -768,14 +608,14 @@
return result.toArray();
}
- case IntermediateCatchEventEditPart.VISUAL_ID: {
+ case ServiceTask2EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateCatchEvent_2010_incominglinks,
+ Messages.NavigatorGroupName_ServiceTask_3004_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateCatchEvent_2010_outgoinglinks,
+ Messages.NavigatorGroupName_ServiceTask_3004_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -807,14 +647,14 @@
return result.toArray();
}
- case IntermediateCatchEvent4EditPart.VISUAL_ID: {
+ case UserTask2EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateCatchEvent_3011_incominglinks,
+ Messages.NavigatorGroupName_UserTask_3002_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateCatchEvent_3011_outgoinglinks,
+ Messages.NavigatorGroupName_UserTask_3002_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -846,28 +686,18 @@
return result.toArray();
}
- case EndEvent6EditPart.VISUAL_ID: {
+ case DataObjectEditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_EndEvent_3010_incominglinks,
+ Messages.NavigatorGroupName_DataObject_2014_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_EndEvent_3010_outgoinglinks,
+ Messages.NavigatorGroupName_DataObject_2014_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
.getType(AssociationEditPart.VISUAL_ID));
incominglinks.addChildren(createNavigatorItems(connectedViews,
incominglinks, true));
@@ -885,131 +715,112 @@
return result.toArray();
}
- case StartEvent4EditPart.VISUAL_ID: {
+ case ProcessEditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_StartEvent_3005_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_StartEvent_3005_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Diagram sv = (Diagram) view;
+ Bpmn2NavigatorGroup links = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_Process_1000_links,
+ "icons/linksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(UserTaskEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(ServiceTaskEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(StartEventEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(StartEvent2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(EndEventEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(ExclusiveGatewayEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- case IntermediateCatchEvent3EditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateCatchEvent_2013_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateCatchEvent_2013_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(ParallelGatewayEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(EndEvent2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(EndEvent3EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateCatchEventEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateThrowEventEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateCatchEvent2EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- case ExclusiveGateway2EditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ExclusiveGateway_3007_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ExclusiveGateway_3007_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ .getType(IntermediateCatchEvent3EditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(DataObjectEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ .getType(TextAnnotationEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(SubProcessEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getChildrenByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry.getType(ScriptTaskEditPart.VISUAL_ID));
+ result.addAll(createNavigatorItems(connectedViews, parentElement,
+ false));
+ connectedViews = getDiagramLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
.getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ links.addChildren(createNavigatorItems(connectedViews, links, false));
+ connectedViews = getDiagramLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
.getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
+ links.addChildren(createNavigatorItems(connectedViews, links, false));
+ if (!links.isEmpty()) {
+ result.add(links);
}
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
return result.toArray();
}
- case StartEvent2EditPart.VISUAL_ID: {
+ case IntermediateCatchEvent3EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_StartEvent_2007_incominglinks,
+ Messages.NavigatorGroupName_IntermediateCatchEvent_2013_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_StartEvent_2007_outgoinglinks,
+ Messages.NavigatorGroupName_IntermediateCatchEvent_2013_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -1041,28 +852,18 @@
return result.toArray();
}
- case ServiceTask2EditPart.VISUAL_ID: {
+ case TextAnnotation2EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ServiceTask_3004_incominglinks,
+ Messages.NavigatorGroupName_TextAnnotation_3015_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ServiceTask_3004_outgoinglinks,
+ Messages.NavigatorGroupName_TextAnnotation_3015_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
.getType(AssociationEditPart.VISUAL_ID));
incominglinks.addChildren(createNavigatorItems(connectedViews,
incominglinks, true));
@@ -1080,14 +881,14 @@
return result.toArray();
}
- case TextAnnotationEditPart.VISUAL_ID: {
+ case DataObject2EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_TextAnnotation_2015_incominglinks,
+ Messages.NavigatorGroupName_DataObject_3014_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_TextAnnotation_2015_outgoinglinks,
+ Messages.NavigatorGroupName_DataObject_3014_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -1408,165 +1209,6 @@
return result.toArray();
}
- case SubProcessEditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_SubProcess_2016_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_SubProcess_2016_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(SubProcess2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(UserTask2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(ServiceTask2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(StartEvent3EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(StartEvent4EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(EndEvent4EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(ExclusiveGateway2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(ParallelGateway2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(EndEvent5EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(EndEvent6EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(IntermediateCatchEvent4EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(IntermediateThrowEvent2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(IntermediateCatchEvent5EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(IntermediateCatchEvent4EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(DataObject2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(TextAnnotation2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(ScriptTask2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
- case ParallelGateway2EditPart.VISUAL_ID: {
- LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
- Node sv = (Node) view;
- Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ParallelGateway_3008_incominglinks,
- "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ParallelGateway_3008_outgoinglinks,
- "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
- Collection<View> connectedViews;
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(SequenceFlowEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- connectedViews = getIncomingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- incominglinks.addChildren(createNavigatorItems(connectedViews,
- incominglinks, true));
- connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry
- .getType(AssociationEditPart.VISUAL_ID));
- outgoinglinks.addChildren(createNavigatorItems(connectedViews,
- outgoinglinks, true));
- if (!incominglinks.isEmpty()) {
- result.add(incominglinks);
- }
- if (!outgoinglinks.isEmpty()) {
- result.add(outgoinglinks);
- }
- return result.toArray();
- }
-
case AssociationEditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Edge sv = (Edge) view;
@@ -1904,6 +1546,45 @@
return result.toArray();
}
+ case StartEventEditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_StartEvent_2003_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_StartEvent_2003_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+
case EndEvent4EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
@@ -1943,14 +1624,14 @@
return result.toArray();
}
- case ScriptTaskEditPart.VISUAL_ID: {
+ case ExclusiveGatewayEditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ScriptTask_2017_incominglinks,
+ Messages.NavigatorGroupName_ExclusiveGateway_2005_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ScriptTask_2017_outgoinglinks,
+ Messages.NavigatorGroupName_ExclusiveGateway_2005_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -1982,18 +1663,47 @@
return result.toArray();
}
- case ParallelGatewayEditPart.VISUAL_ID: {
+ case TextAnnotationEditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ParallelGateway_2006_incominglinks,
+ Messages.NavigatorGroupName_TextAnnotation_2015_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_ParallelGateway_2006_outgoinglinks,
+ Messages.NavigatorGroupName_TextAnnotation_2015_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+
+ case EndEvent6EditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_EndEvent_3010_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_EndEvent_3010_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
.getType(SequenceFlowEditPart.VISUAL_ID));
incominglinks.addChildren(createNavigatorItems(connectedViews,
incominglinks, true));
@@ -2021,14 +1731,14 @@
return result.toArray();
}
- case UserTaskEditPart.VISUAL_ID: {
+ case IntermediateCatchEvent2EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_UserTask_2001_incominglinks,
+ Messages.NavigatorGroupName_IntermediateCatchEvent_2012_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_UserTask_2001_outgoinglinks,
+ Messages.NavigatorGroupName_IntermediateCatchEvent_2012_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -2060,14 +1770,14 @@
return result.toArray();
}
- case UserTask2EditPart.VISUAL_ID: {
+ case EndEvent2EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_UserTask_3002_incominglinks,
+ Messages.NavigatorGroupName_EndEvent_2008_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_UserTask_3002_outgoinglinks,
+ Messages.NavigatorGroupName_EndEvent_2008_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -2099,99 +1809,174 @@
return result.toArray();
}
- case SubProcess2EditPart.VISUAL_ID: {
+ case IntermediateCatchEvent4EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_SubProcess_3001_incominglinks,
+ Messages.NavigatorGroupName_IntermediateCatchEvent_3011_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_SubProcess_3001_outgoinglinks,
+ Messages.NavigatorGroupName_IntermediateCatchEvent_3011_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(SubProcess2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(UserTask2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(ServiceTask2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(StartEvent3EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(StartEvent4EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(EndEvent4EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+
+ case IntermediateThrowEventEditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_IntermediateThrowEvent_2011_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_IntermediateThrowEvent_2011_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(ExclusiveGateway2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(ParallelGateway2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(EndEvent5EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
- Bpmn2VisualIDRegistry.getType(EndEvent6EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(IntermediateCatchEvent4EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(IntermediateThrowEvent2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+
+ case UserTaskEditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_UserTask_2001_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_UserTask_2001_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(IntermediateCatchEvent5EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(IntermediateCatchEvent4EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(DataObject2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(TextAnnotation2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
- connectedViews = getChildrenByType(Collections.singleton(sv),
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+
+ case ScriptTask2EditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_ScriptTask_3016_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_ScriptTask_3016_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
- .getType(ScriptTask2EditPart.VISUAL_ID));
- result.addAll(createNavigatorItems(connectedViews, parentElement,
- false));
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+
+ case EndEvent3EditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_EndEvent_2009_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_EndEvent_2009_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
.getType(SequenceFlowEditPart.VISUAL_ID));
incominglinks.addChildren(createNavigatorItems(connectedViews,
incominglinks, true));
@@ -2219,18 +2004,28 @@
return result.toArray();
}
- case DataObjectEditPart.VISUAL_ID: {
+ case StartEvent4EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_DataObject_2014_incominglinks,
+ Messages.NavigatorGroupName_StartEvent_3005_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_DataObject_2014_outgoinglinks,
+ Messages.NavigatorGroupName_StartEvent_3005_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
.getType(AssociationEditPart.VISUAL_ID));
incominglinks.addChildren(createNavigatorItems(connectedViews,
incominglinks, true));
@@ -2248,6 +2043,45 @@
return result.toArray();
}
+ case IntermediateCatchEventEditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_IntermediateCatchEvent_2010_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_IntermediateCatchEvent_2010_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+
case IntermediateCatchEvent5EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
@@ -2287,14 +2121,14 @@
return result.toArray();
}
- case IntermediateCatchEvent2EditPart.VISUAL_ID: {
+ case IntermediateThrowEvent2EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateCatchEvent_2012_incominglinks,
+ Messages.NavigatorGroupName_IntermediateThrowEvent_3012_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_IntermediateCatchEvent_2012_outgoinglinks,
+ Messages.NavigatorGroupName_IntermediateThrowEvent_3012_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -2326,14 +2160,14 @@
return result.toArray();
}
- case StartEventEditPart.VISUAL_ID: {
+ case ScriptTaskEditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_StartEvent_2003_incominglinks,
+ Messages.NavigatorGroupName_ScriptTask_2017_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_StartEvent_2003_outgoinglinks,
+ Messages.NavigatorGroupName_ScriptTask_2017_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
@@ -2365,18 +2199,28 @@
return result.toArray();
}
- case DataObject2EditPart.VISUAL_ID: {
+ case StartEvent2EditPart.VISUAL_ID: {
LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
Node sv = (Node) view;
Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_DataObject_3014_incominglinks,
+ Messages.NavigatorGroupName_StartEvent_2007_incominglinks,
"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
- Messages.NavigatorGroupName_DataObject_3014_outgoinglinks,
+ Messages.NavigatorGroupName_StartEvent_2007_outgoinglinks,
"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
Collection<View> connectedViews;
connectedViews = getIncomingLinksByType(Collections.singleton(sv),
Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
.getType(AssociationEditPart.VISUAL_ID));
incominglinks.addChildren(createNavigatorItems(connectedViews,
incominglinks, true));
@@ -2393,7 +2237,163 @@
}
return result.toArray();
}
+
+ case StartEvent3EditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_StartEvent_3003_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_StartEvent_3003_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
}
+
+ case ExclusiveGateway2EditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_ExclusiveGateway_3007_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_ExclusiveGateway_3007_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+
+ case ServiceTaskEditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_ServiceTask_2002_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_ServiceTask_2002_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+
+ case ParallelGateway2EditPart.VISUAL_ID: {
+ LinkedList<Bpmn2AbstractNavigatorItem> result = new
LinkedList<Bpmn2AbstractNavigatorItem>();
+ Node sv = (Node) view;
+ Bpmn2NavigatorGroup incominglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_ParallelGateway_3008_incominglinks,
+ "icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Bpmn2NavigatorGroup outgoinglinks = new Bpmn2NavigatorGroup(
+ Messages.NavigatorGroupName_ParallelGateway_3008_outgoinglinks,
+ "icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+ Collection<View> connectedViews;
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(SequenceFlowEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ incominglinks.addChildren(createNavigatorItems(connectedViews,
+ incominglinks, true));
+ connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+ Bpmn2VisualIDRegistry
+ .getType(AssociationEditPart.VISUAL_ID));
+ outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+ outgoinglinks, true));
+ if (!incominglinks.isEmpty()) {
+ result.add(incominglinks);
+ }
+ if (!outgoinglinks.isEmpty()) {
+ result.add(outgoinglinks);
+ }
+ return result.toArray();
+ }
+ }
return EMPTY_ARRAY;
}
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/navigator/Bpmn2NavigatorLabelProvider.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/navigator/Bpmn2NavigatorLabelProvider.java 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/navigator/Bpmn2NavigatorLabelProvider.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -135,114 +135,114 @@
*/
public Image getImage(View view) {
switch (Bpmn2VisualIDRegistry.getVisualID(view)) {
- case ProcessEditPart.VISUAL_ID:
- return getImage(
- "Navigator?Diagram?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?Process",
Bpmn2ElementTypes.Process_1000); //$NON-NLS-1$
- case EndEvent2EditPart.VISUAL_ID:
- return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?EndEvent",
Bpmn2ElementTypes.EndEvent_2008); //$NON-NLS-1$
- case ExclusiveGatewayEditPart.VISUAL_ID:
- return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ExclusiveGateway",
Bpmn2ElementTypes.ExclusiveGateway_2005); //$NON-NLS-1$
- case ScriptTask2EditPart.VISUAL_ID:
- return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ScriptTask",
Bpmn2ElementTypes.ScriptTask_3016); //$NON-NLS-1$
- case StartEvent3EditPart.VISUAL_ID:
- return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?StartEvent",
Bpmn2ElementTypes.StartEvent_3003); //$NON-NLS-1$
- case EndEvent3EditPart.VISUAL_ID:
- return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?EndEvent",
Bpmn2ElementTypes.EndEvent_2009); //$NON-NLS-1$
case EndEventEditPart.VISUAL_ID:
return getImage(
"Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?EndEvent",
Bpmn2ElementTypes.EndEvent_2004); //$NON-NLS-1$
- case IntermediateThrowEvent2EditPart.VISUAL_ID:
+ case ParallelGatewayEditPart.VISUAL_ID:
return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateThrowEvent",
Bpmn2ElementTypes.IntermediateThrowEvent_3012); //$NON-NLS-1$
- case IntermediateThrowEventEditPart.VISUAL_ID:
- return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateThrowEvent",
Bpmn2ElementTypes.IntermediateThrowEvent_2011); //$NON-NLS-1$
- case TextAnnotation2EditPart.VISUAL_ID:
- return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?TextAnnotation",
Bpmn2ElementTypes.TextAnnotation_3015); //$NON-NLS-1$
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ParallelGateway",
Bpmn2ElementTypes.ParallelGateway_2006); //$NON-NLS-1$
case EndEvent5EditPart.VISUAL_ID:
return getImage(
"Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?EndEvent",
Bpmn2ElementTypes.EndEvent_3009); //$NON-NLS-1$
- case ServiceTaskEditPart.VISUAL_ID:
+ case SubProcessEditPart.VISUAL_ID:
return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ServiceTask",
Bpmn2ElementTypes.ServiceTask_2002); //$NON-NLS-1$
- case IntermediateCatchEventEditPart.VISUAL_ID:
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?SubProcess",
Bpmn2ElementTypes.SubProcess_2016); //$NON-NLS-1$
+ case SubProcess2EditPart.VISUAL_ID:
return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateCatchEvent",
Bpmn2ElementTypes.IntermediateCatchEvent_2010); //$NON-NLS-1$
- case IntermediateCatchEvent4EditPart.VISUAL_ID:
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?SubProcess",
Bpmn2ElementTypes.SubProcess_3001); //$NON-NLS-1$
+ case ServiceTask2EditPart.VISUAL_ID:
return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateCatchEvent",
Bpmn2ElementTypes.IntermediateCatchEvent_3011); //$NON-NLS-1$
- case EndEvent6EditPart.VISUAL_ID:
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ServiceTask",
Bpmn2ElementTypes.ServiceTask_3004); //$NON-NLS-1$
+ case UserTask2EditPart.VISUAL_ID:
return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?EndEvent",
Bpmn2ElementTypes.EndEvent_3010); //$NON-NLS-1$
- case StartEvent4EditPart.VISUAL_ID:
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?UserTask",
Bpmn2ElementTypes.UserTask_3002); //$NON-NLS-1$
+ case DataObjectEditPart.VISUAL_ID:
return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?StartEvent",
Bpmn2ElementTypes.StartEvent_3005); //$NON-NLS-1$
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?DataObject",
Bpmn2ElementTypes.DataObject_2014); //$NON-NLS-1$
+ case ProcessEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Diagram?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?Process",
Bpmn2ElementTypes.Process_1000); //$NON-NLS-1$
case IntermediateCatchEvent3EditPart.VISUAL_ID:
return getImage(
"Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateCatchEvent",
Bpmn2ElementTypes.IntermediateCatchEvent_2013); //$NON-NLS-1$
- case ExclusiveGateway2EditPart.VISUAL_ID:
+ case TextAnnotation2EditPart.VISUAL_ID:
return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ExclusiveGateway",
Bpmn2ElementTypes.ExclusiveGateway_3007); //$NON-NLS-1$
- case StartEvent2EditPart.VISUAL_ID:
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?TextAnnotation",
Bpmn2ElementTypes.TextAnnotation_3015); //$NON-NLS-1$
+ case DataObject2EditPart.VISUAL_ID:
return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?StartEvent",
Bpmn2ElementTypes.StartEvent_2007); //$NON-NLS-1$
- case ServiceTask2EditPart.VISUAL_ID:
- return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ServiceTask",
Bpmn2ElementTypes.ServiceTask_3004); //$NON-NLS-1$
- case TextAnnotationEditPart.VISUAL_ID:
- return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?TextAnnotation",
Bpmn2ElementTypes.TextAnnotation_2015); //$NON-NLS-1$
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?DataObject",
Bpmn2ElementTypes.DataObject_3014); //$NON-NLS-1$
case SequenceFlowEditPart.VISUAL_ID:
return getImage(
"Navigator?Link?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?SequenceFlow",
Bpmn2ElementTypes.SequenceFlow_4001); //$NON-NLS-1$
- case SubProcessEditPart.VISUAL_ID:
- return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?SubProcess",
Bpmn2ElementTypes.SubProcess_2016); //$NON-NLS-1$
- case ParallelGateway2EditPart.VISUAL_ID:
- return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ParallelGateway",
Bpmn2ElementTypes.ParallelGateway_3008); //$NON-NLS-1$
case AssociationEditPart.VISUAL_ID:
return getImage(
"Navigator?Link?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?Association",
Bpmn2ElementTypes.Association_4002); //$NON-NLS-1$
+ case StartEventEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?StartEvent",
Bpmn2ElementTypes.StartEvent_2003); //$NON-NLS-1$
case EndEvent4EditPart.VISUAL_ID:
return getImage(
"Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?EndEvent",
Bpmn2ElementTypes.EndEvent_3006); //$NON-NLS-1$
- case ScriptTaskEditPart.VISUAL_ID:
+ case ExclusiveGatewayEditPart.VISUAL_ID:
return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ScriptTask",
Bpmn2ElementTypes.ScriptTask_2017); //$NON-NLS-1$
- case ParallelGatewayEditPart.VISUAL_ID:
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ExclusiveGateway",
Bpmn2ElementTypes.ExclusiveGateway_2005); //$NON-NLS-1$
+ case TextAnnotationEditPart.VISUAL_ID:
return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ParallelGateway",
Bpmn2ElementTypes.ParallelGateway_2006); //$NON-NLS-1$
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?TextAnnotation",
Bpmn2ElementTypes.TextAnnotation_2015); //$NON-NLS-1$
+ case EndEvent6EditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?EndEvent",
Bpmn2ElementTypes.EndEvent_3010); //$NON-NLS-1$
+ case IntermediateCatchEvent2EditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateCatchEvent",
Bpmn2ElementTypes.IntermediateCatchEvent_2012); //$NON-NLS-1$
+ case EndEvent2EditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?EndEvent",
Bpmn2ElementTypes.EndEvent_2008); //$NON-NLS-1$
+ case IntermediateCatchEvent4EditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateCatchEvent",
Bpmn2ElementTypes.IntermediateCatchEvent_3011); //$NON-NLS-1$
+ case IntermediateThrowEventEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateThrowEvent",
Bpmn2ElementTypes.IntermediateThrowEvent_2011); //$NON-NLS-1$
case UserTaskEditPart.VISUAL_ID:
return getImage(
"Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?UserTask",
Bpmn2ElementTypes.UserTask_2001); //$NON-NLS-1$
- case UserTask2EditPart.VISUAL_ID:
+ case ScriptTask2EditPart.VISUAL_ID:
return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?UserTask",
Bpmn2ElementTypes.UserTask_3002); //$NON-NLS-1$
- case SubProcess2EditPart.VISUAL_ID:
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ScriptTask",
Bpmn2ElementTypes.ScriptTask_3016); //$NON-NLS-1$
+ case EndEvent3EditPart.VISUAL_ID:
return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?SubProcess",
Bpmn2ElementTypes.SubProcess_3001); //$NON-NLS-1$
- case DataObjectEditPart.VISUAL_ID:
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?EndEvent",
Bpmn2ElementTypes.EndEvent_2009); //$NON-NLS-1$
+ case StartEvent4EditPart.VISUAL_ID:
return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?DataObject",
Bpmn2ElementTypes.DataObject_2014); //$NON-NLS-1$
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?StartEvent",
Bpmn2ElementTypes.StartEvent_3005); //$NON-NLS-1$
+ case IntermediateCatchEventEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateCatchEvent",
Bpmn2ElementTypes.IntermediateCatchEvent_2010); //$NON-NLS-1$
case IntermediateCatchEvent5EditPart.VISUAL_ID:
return getImage(
"Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateCatchEvent",
Bpmn2ElementTypes.IntermediateCatchEvent_3013); //$NON-NLS-1$
- case IntermediateCatchEvent2EditPart.VISUAL_ID:
+ case IntermediateThrowEvent2EditPart.VISUAL_ID:
return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateCatchEvent",
Bpmn2ElementTypes.IntermediateCatchEvent_2012); //$NON-NLS-1$
- case StartEventEditPart.VISUAL_ID:
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?IntermediateThrowEvent",
Bpmn2ElementTypes.IntermediateThrowEvent_3012); //$NON-NLS-1$
+ case ScriptTaskEditPart.VISUAL_ID:
return getImage(
- "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?StartEvent",
Bpmn2ElementTypes.StartEvent_2003); //$NON-NLS-1$
- case DataObject2EditPart.VISUAL_ID:
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ScriptTask",
Bpmn2ElementTypes.ScriptTask_2017); //$NON-NLS-1$
+ case StartEvent2EditPart.VISUAL_ID:
return getImage(
- "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?DataObject",
Bpmn2ElementTypes.DataObject_3014); //$NON-NLS-1$
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?StartEvent",
Bpmn2ElementTypes.StartEvent_2007); //$NON-NLS-1$
+ case StartEvent3EditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?StartEvent",
Bpmn2ElementTypes.StartEvent_3003); //$NON-NLS-1$
+ case ExclusiveGateway2EditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ExclusiveGateway",
Bpmn2ElementTypes.ExclusiveGateway_3007); //$NON-NLS-1$
+ case ServiceTaskEditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?TopLevelNode?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ServiceTask",
Bpmn2ElementTypes.ServiceTask_2002); //$NON-NLS-1$
+ case ParallelGateway2EditPart.VISUAL_ID:
+ return getImage(
+ "Navigator?Node?http://www.omg.org/spec/BPMN/20100524/MODEL-XMI?ParallelGateway",
Bpmn2ElementTypes.ParallelGateway_3008); //$NON-NLS-1$
}
return getImage("Navigator?UnknownElement", null); //$NON-NLS-1$
}
@@ -295,78 +295,78 @@
return getUnresolvedDomainElementProxyText(view);
}
switch (Bpmn2VisualIDRegistry.getVisualID(view)) {
- case ProcessEditPart.VISUAL_ID:
- return getProcess_1000Text(view);
- case EndEvent2EditPart.VISUAL_ID:
- return getEndEvent_2008Text(view);
- case ExclusiveGatewayEditPart.VISUAL_ID:
- return getExclusiveGateway_2005Text(view);
- case ScriptTask2EditPart.VISUAL_ID:
- return getScriptTask_3016Text(view);
- case StartEvent3EditPart.VISUAL_ID:
- return getStartEvent_3003Text(view);
- case EndEvent3EditPart.VISUAL_ID:
- return getEndEvent_2009Text(view);
case EndEventEditPart.VISUAL_ID:
return getEndEvent_2004Text(view);
- case IntermediateThrowEvent2EditPart.VISUAL_ID:
- return getIntermediateThrowEvent_3012Text(view);
- case IntermediateThrowEventEditPart.VISUAL_ID:
- return getIntermediateThrowEvent_2011Text(view);
- case TextAnnotation2EditPart.VISUAL_ID:
- return getTextAnnotation_3015Text(view);
+ case ParallelGatewayEditPart.VISUAL_ID:
+ return getParallelGateway_2006Text(view);
case EndEvent5EditPart.VISUAL_ID:
return getEndEvent_3009Text(view);
- case ServiceTaskEditPart.VISUAL_ID:
- return getServiceTask_2002Text(view);
- case IntermediateCatchEventEditPart.VISUAL_ID:
- return getIntermediateCatchEvent_2010Text(view);
- case IntermediateCatchEvent4EditPart.VISUAL_ID:
- return getIntermediateCatchEvent_3011Text(view);
- case EndEvent6EditPart.VISUAL_ID:
- return getEndEvent_3010Text(view);
- case StartEvent4EditPart.VISUAL_ID:
- return getStartEvent_3005Text(view);
+ case SubProcessEditPart.VISUAL_ID:
+ return getSubProcess_2016Text(view);
+ case SubProcess2EditPart.VISUAL_ID:
+ return getSubProcess_3001Text(view);
+ case ServiceTask2EditPart.VISUAL_ID:
+ return getServiceTask_3004Text(view);
+ case UserTask2EditPart.VISUAL_ID:
+ return getUserTask_3002Text(view);
+ case DataObjectEditPart.VISUAL_ID:
+ return getDataObject_2014Text(view);
+ case ProcessEditPart.VISUAL_ID:
+ return getProcess_1000Text(view);
case IntermediateCatchEvent3EditPart.VISUAL_ID:
return getIntermediateCatchEvent_2013Text(view);
- case ExclusiveGateway2EditPart.VISUAL_ID:
- return getExclusiveGateway_3007Text(view);
- case StartEvent2EditPart.VISUAL_ID:
- return getStartEvent_2007Text(view);
- case ServiceTask2EditPart.VISUAL_ID:
- return getServiceTask_3004Text(view);
- case TextAnnotationEditPart.VISUAL_ID:
- return getTextAnnotation_2015Text(view);
+ case TextAnnotation2EditPart.VISUAL_ID:
+ return getTextAnnotation_3015Text(view);
+ case DataObject2EditPart.VISUAL_ID:
+ return getDataObject_3014Text(view);
case SequenceFlowEditPart.VISUAL_ID:
return getSequenceFlow_4001Text(view);
- case SubProcessEditPart.VISUAL_ID:
- return getSubProcess_2016Text(view);
- case ParallelGateway2EditPart.VISUAL_ID:
- return getParallelGateway_3008Text(view);
case AssociationEditPart.VISUAL_ID:
return getAssociation_4002Text(view);
+ case StartEventEditPart.VISUAL_ID:
+ return getStartEvent_2003Text(view);
case EndEvent4EditPart.VISUAL_ID:
return getEndEvent_3006Text(view);
- case ScriptTaskEditPart.VISUAL_ID:
- return getScriptTask_2017Text(view);
- case ParallelGatewayEditPart.VISUAL_ID:
- return getParallelGateway_2006Text(view);
+ case ExclusiveGatewayEditPart.VISUAL_ID:
+ return getExclusiveGateway_2005Text(view);
+ case TextAnnotationEditPart.VISUAL_ID:
+ return getTextAnnotation_2015Text(view);
+ case EndEvent6EditPart.VISUAL_ID:
+ return getEndEvent_3010Text(view);
+ case IntermediateCatchEvent2EditPart.VISUAL_ID:
+ return getIntermediateCatchEvent_2012Text(view);
+ case EndEvent2EditPart.VISUAL_ID:
+ return getEndEvent_2008Text(view);
+ case IntermediateCatchEvent4EditPart.VISUAL_ID:
+ return getIntermediateCatchEvent_3011Text(view);
+ case IntermediateThrowEventEditPart.VISUAL_ID:
+ return getIntermediateThrowEvent_2011Text(view);
case UserTaskEditPart.VISUAL_ID:
return getUserTask_2001Text(view);
- case UserTask2EditPart.VISUAL_ID:
- return getUserTask_3002Text(view);
- case SubProcess2EditPart.VISUAL_ID:
- return getSubProcess_3001Text(view);
- case DataObjectEditPart.VISUAL_ID:
- return getDataObject_2014Text(view);
+ case ScriptTask2EditPart.VISUAL_ID:
+ return getScriptTask_3016Text(view);
+ case EndEvent3EditPart.VISUAL_ID:
+ return getEndEvent_2009Text(view);
+ case StartEvent4EditPart.VISUAL_ID:
+ return getStartEvent_3005Text(view);
+ case IntermediateCatchEventEditPart.VISUAL_ID:
+ return getIntermediateCatchEvent_2010Text(view);
case IntermediateCatchEvent5EditPart.VISUAL_ID:
return getIntermediateCatchEvent_3013Text(view);
- case IntermediateCatchEvent2EditPart.VISUAL_ID:
- return getIntermediateCatchEvent_2012Text(view);
- case StartEventEditPart.VISUAL_ID:
- return getStartEvent_2003Text(view);
- case DataObject2EditPart.VISUAL_ID:
- return getDataObject_3014Text(view);
+ case IntermediateThrowEvent2EditPart.VISUAL_ID:
+ return getIntermediateThrowEvent_3012Text(view);
+ case ScriptTaskEditPart.VISUAL_ID:
+ return getScriptTask_2017Text(view);
+ case StartEvent2EditPart.VISUAL_ID:
+ return getStartEvent_2007Text(view);
+ case StartEvent3EditPart.VISUAL_ID:
+ return getStartEvent_3003Text(view);
+ case ExclusiveGateway2EditPart.VISUAL_ID:
+ return getExclusiveGateway_3007Text(view);
+ case ServiceTaskEditPart.VISUAL_ID:
+ return getServiceTask_2002Text(view);
+ case ParallelGateway2EditPart.VISUAL_ID:
+ return getParallelGateway_3008Text(view);
}
return getUnknownElementText(view);
}
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2CreationWizard.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2CreationWizard.java 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2CreationWizard.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -37,11 +37,6 @@
/**
* @generated
*/
- protected Bpmn2CreationWizardPage domainModelFilePage;
-
- /**
- * @generated
- */
protected Resource diagram;
/**
@@ -102,32 +97,12 @@
*/
public void addPages() {
diagramModelFilePage = new Bpmn2CreationWizardPage(
- "DiagramModelFile", getSelection(), "prd"); //$NON-NLS-1$
//$NON-NLS-2$
+ "DiagramModelFile", getSelection(), "jbpmn"); //$NON-NLS-1$
//$NON-NLS-2$
diagramModelFilePage
.setTitle(Messages.Bpmn2CreationWizard_DiagramModelFilePageTitle);
diagramModelFilePage
.setDescription(Messages.Bpmn2CreationWizard_DiagramModelFilePageDescription);
addPage(diagramModelFilePage);
-
- domainModelFilePage = new Bpmn2CreationWizardPage(
- "DomainModelFile", getSelection(), "bpmn2") { //$NON-NLS-1$
//$NON-NLS-2$
-
- public void setVisible(boolean visible) {
- if (visible) {
- String fileName = diagramModelFilePage.getFileName();
- fileName = fileName.substring(0,
- fileName.length() - ".prd".length()); //$NON-NLS-1$
- setFileName(Bpmn2DiagramEditorUtil.getUniqueFileName(
- getContainerFullPath(), fileName, "bpmn2")); //$NON-NLS-1$
- }
- super.setVisible(visible);
- }
- };
- domainModelFilePage
- .setTitle(Messages.Bpmn2CreationWizard_DomainModelFilePageTitle);
- domainModelFilePage
- .setDescription(Messages.Bpmn2CreationWizard_DomainModelFilePageDescription);
- addPage(domainModelFilePage);
}
/**
@@ -139,8 +114,7 @@
protected void execute(IProgressMonitor monitor)
throws CoreException, InterruptedException {
diagram = Bpmn2DiagramEditorUtil.createDiagram(
- diagramModelFilePage.getURI(),
- domainModelFilePage.getURI(), monitor);
+ diagramModelFilePage.getURI(), monitor);
if (isOpenNewlyCreatedDiagramEditor() && diagram != null) {
try {
Bpmn2DiagramEditorUtil.openDiagram(diagram);
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2DiagramEditorUtil.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2DiagramEditorUtil.java 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2DiagramEditorUtil.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -14,7 +14,11 @@
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.DocumentRoot;
import org.eclipse.bpmn2.Process;
-import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.di.BPMNEdge;
+import org.eclipse.bpmn2.di.BPMNPlane;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.di.BpmnDiFactory;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.operations.OperationHistoryFactory;
import org.eclipse.core.resources.IFile;
@@ -27,20 +31,21 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.emf.common.util.EList;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.dd.dc.DcFactory;
+import org.eclipse.dd.di.DiFactory;
+import org.eclipse.dd.di.DiagramElement;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.ExtendedMetaData;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
@@ -49,7 +54,6 @@
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.wizard.Wizard;
@@ -59,7 +63,6 @@
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;
-import org.jboss.tools.bpmn2.process.diagram.edit.parts.ProcessEditPart;
/**
* @generated
@@ -163,7 +166,7 @@
* This method should be called within a workspace modify operation since it creates
resources.
* @generated not
*/
- public static Resource createDiagram(URI diagramURI, URI modelURI,
+ public static Resource createDiagram(URI diagramURI,
IProgressMonitor progressMonitor) {
TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
.createEditingDomain();
@@ -171,9 +174,11 @@
Messages.Bpmn2DiagramEditorUtil_CreateDiagramProgressTask, 3);
final Resource diagramResource = editingDomain.getResourceSet()
.createResource(diagramURI);
- final Resource modelResource = editingDomain.getResourceSet()
- .createResource(modelURI);
- final String diagramName = diagramURI.lastSegment();
+// ((XMLResource) diagramResource).getDefaultSaveOptions().put(
+// XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+// ((XMLResource) diagramResource).getDefaultLoadOptions().put(
+// XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+// final String diagramName = diagramURI.lastSegment();
AbstractTransactionalCommand command = new AbstractTransactionalCommand(
editingDomain,
Messages.Bpmn2DiagramEditorUtil_CreateDiagramCommandLabel,
@@ -182,26 +187,34 @@
IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
EObject model = createInitialModel();
- attachModelToResource(model, modelResource);
+ attachModelToResource(model, diagramResource);
EStructuralFeature definitionsFeature =
Bpmn2Package.Literals.DOCUMENT_ROOT__DEFINITIONS;
Definitions definitionsObject = (Definitions) model
.eGet(definitionsFeature);
- List<RootElement> rootElements = definitionsObject
- .getRootElements();
- RootElement rootElement = rootElements.get(0);
- Diagram diagram = ViewService.createDiagram(rootElement,
- ProcessEditPart.MODEL_ID,
- Bpmn2DiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- if (diagram != null) {
- diagramResource.getContents().add(diagram);
- diagram.setName(diagramName);
- diagram.setElement(rootElement);
- }
+// List<RootElement> rootElements = definitionsObject
+// .getRootElements();
+// RootElement rootElement = rootElements.get(0);
+ BPMNDiagram diagram = definitionsObject.getDiagrams().get(0);
+// DiagramElement element = diagram.getPlane().getPlaneElement().get(0);
+// if (rootElement instanceof Process) {
+// ((Process)rootElement).setName(diagramName);
+// }
+// Diagram diagram = ViewService.createDiagram(rootElement,
+// ProcessEditPart.MODEL_ID,
+// Bpmn2DiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+// if (diagram != null) {
+// diagramResource.getContents().add(diagram);
+// diagram.setName(diagramName);
+// diagram.setElement(rootElement);
+// }
try {
- modelResource
+
+ diagramResource
.save(org.jboss.tools.bpmn2.process.diagram.part.Bpmn2DiagramEditorUtil
.getSaveOptions());
+// diagram.getPlane().getPlaneElement().remove(element);
+ diagram.getPlane().getPlaneElement().clear();
diagramResource
.save(org.jboss.tools.bpmn2.process.diagram.part.Bpmn2DiagramEditorUtil
.getSaveOptions());
@@ -220,7 +233,7 @@
Bpmn2DiagramEditorPlugin.getInstance().logError(
"Unable to create model and diagram", e); //$NON-NLS-1$
}
- setCharset(WorkspaceSynchronizer.getFile(modelResource));
+
setCharset(WorkspaceSynchronizer.getFile(diagramResource));
return diagramResource;
}
@@ -244,6 +257,20 @@
Process processObject = Bpmn2Factory.eINSTANCE.createProcess();
rootObject.eSet(definitionsFeature, definitionsObject);
definitionsObject.getRootElements().add(processObject);
+ BPMNDiagram diagram = BpmnDiFactory.eINSTANCE.createBPMNDiagram();
+ BPMNPlane plane = BpmnDiFactory.eINSTANCE.createBPMNPlane();
+ // trick to force inclusion of dc namespace
+ BPMNShape shape = BpmnDiFactory.eINSTANCE.createBPMNShape();
+ Bounds bounds = DcFactory.eINSTANCE.createBounds();
+ shape.setBounds(bounds);
+ plane.getPlaneElement().add(shape);
+ // trick to force inclusion of di namespace
+ BPMNEdge edge = BpmnDiFactory.eINSTANCE.createBPMNEdge();
+ edge.getWaypoint().add(DcFactory.eINSTANCE.createPoint());
+ plane.getPlaneElement().add(edge);
+ diagram.setPlane(plane);
+ plane.setBpmnElement(processObject);
+ definitionsObject.getDiagrams().add(diagram);
return rootObject;
}
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2InitDiagramFileAction.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2InitDiagramFileAction.java 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2InitDiagramFileAction.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -6,6 +6,7 @@
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
import org.eclipse.jface.action.IAction;
@@ -71,7 +72,7 @@
public void run(IAction action) {
TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE
.createEditingDomain();
- ResourceSet resourceSet = editingDomain.getResourceSet();
+ ResourceSet resourceSet = new ResourceSetImpl();
EObject diagramRoot = null;
try {
Resource resource = resourceSet.getResource(domainModelURI, true);
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2NewDiagramFileWizard.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2NewDiagramFileWizard.java 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2NewDiagramFileWizard.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -81,7 +81,7 @@
}
myFileCreationPage.setContainerFullPath(filePath);
myFileCreationPage.setFileName(Bpmn2DiagramEditorUtil
- .getUniqueFileName(filePath, fileName, "prd")); //$NON-NLS-1$
+ .getUniqueFileName(filePath, fileName, "jbpmn")); //$NON-NLS-1$
diagramRootElementSelectionPage = new DiagramRootElementSelectionPage(
Messages.Bpmn2NewDiagramFileWizard_RootSelectionPageName);
@@ -135,6 +135,7 @@
ProcessEditPart.MODEL_ID,
Bpmn2DiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
diagramResource.getContents().add(diagram);
+ diagramResource.getContents().add(diagram.getElement());
return CommandResult.newOKCommandResult();
}
};
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2UriEditorInputTester.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2UriEditorInputTester.java 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2UriEditorInputTester.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -17,7 +17,7 @@
return false;
}
URIEditorInput editorInput = (URIEditorInput) receiver;
- return "prd".equals(editorInput.getURI().fileExtension()); //$NON-NLS-1$
+ return "bpmn2".equals(editorInput.getURI().fileExtension()); //$NON-NLS-1$
}
}
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2VisualIDRegistry.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2VisualIDRegistry.java 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Bpmn2VisualIDRegistry.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -1,15 +1,21 @@
package org.jboss.tools.bpmn2.process.diagram.part;
import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.DataObject;
import org.eclipse.bpmn2.EndEvent;
import org.eclipse.bpmn2.ErrorEventDefinition;
import org.eclipse.bpmn2.IntermediateCatchEvent;
import org.eclipse.bpmn2.IntermediateThrowEvent;
import org.eclipse.bpmn2.MessageEventDefinition;
import org.eclipse.bpmn2.Process;
+import org.eclipse.bpmn2.ScriptTask;
+import org.eclipse.bpmn2.ServiceTask;
import org.eclipse.bpmn2.StartEvent;
+import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.TerminateEventDefinition;
+import org.eclipse.bpmn2.TextAnnotation;
import org.eclipse.bpmn2.TimerEventDefinition;
+import org.eclipse.bpmn2.UserTask;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EObject;
@@ -399,6 +405,35 @@
}
return -1;
}
+
+ public static int getLabelVisualId(EObject containerElement, EObject domainElement) {
+ if (containerElement instanceof Process) {
+ if (domainElement instanceof UserTask) {
+ return UserTaskNameEditPart.VISUAL_ID;
+ } else if (domainElement instanceof ServiceTask) {
+ return ServiceTaskNameEditPart.VISUAL_ID;
+ } else if (domainElement instanceof DataObject) {
+ return DataObjectNameEditPart.VISUAL_ID;
+ } else if (domainElement instanceof TextAnnotation) {
+ return TextAnnotationTextEditPart.VISUAL_ID;
+ } else if (domainElement instanceof ScriptTask) {
+ return ScriptTaskNameEditPart.VISUAL_ID;
+ }
+ } else if (containerElement instanceof SubProcess) {
+ if (domainElement instanceof UserTask) {
+ return UserTaskName2EditPart.VISUAL_ID;
+ } else if (domainElement instanceof ServiceTask) {
+ return ServiceTaskName2EditPart.VISUAL_ID;
+ } else if (domainElement instanceof DataObject) {
+ return DataObjectName2EditPart.VISUAL_ID;
+ } else if (domainElement instanceof TextAnnotation) {
+ return TextAnnotationText2EditPart.VISUAL_ID;
+ } else if (domainElement instanceof ScriptTask) {
+ return ScriptTaskName2EditPart.VISUAL_ID;
+ }
+ }
+ return -1;
+ }
/**
* @generated
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Messages.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Messages.java 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/part/Messages.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -38,16 +38,6 @@
/**
* @generated
*/
- public static String Bpmn2CreationWizard_DomainModelFilePageTitle;
-
- /**
- * @generated
- */
- public static String Bpmn2CreationWizard_DomainModelFilePageDescription;
-
- /**
- * @generated
- */
public static String Bpmn2CreationWizardOpenEditorError;
/**
Modified:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/providers/Bpmn2ViewProvider.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/providers/Bpmn2ViewProvider.java 2010-11-22
09:34:38 UTC (rev 26815)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src/org/jboss/tools/bpmn2/process/diagram/providers/Bpmn2ViewProvider.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -41,6 +41,7 @@
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.FontData;
+import org.jboss.tools.bpmn2.gmf.notation.BpmnNotationFactory;
import org.jboss.tools.bpmn2.process.diagram.edit.parts.AssociationEditPart;
import org.jboss.tools.bpmn2.process.diagram.edit.parts.DataObject2EditPart;
import org.jboss.tools.bpmn2.process.diagram.edit.parts.DataObjectEditPart;
@@ -438,12 +439,14 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createUserTask_2001(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry.getType(UserTaskEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
@@ -482,13 +485,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createServiceTask_2002(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(ServiceTaskEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -529,13 +534,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createStartEvent_2003(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(StartEventEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -573,13 +580,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createStartEvent_2007(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(StartEvent2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -617,12 +626,14 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createEndEvent_2004(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry.getType(EndEventEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
@@ -659,13 +670,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createExclusiveGateway_2005(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(ExclusiveGatewayEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -703,13 +716,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createParallelGateway_2006(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(ParallelGatewayEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -747,12 +762,14 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createEndEvent_2008(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry.getType(EndEvent2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
@@ -789,12 +806,14 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createEndEvent_2009(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry.getType(EndEvent3EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
@@ -831,13 +850,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createIntermediateCatchEvent_2010(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(IntermediateCatchEventEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -875,13 +896,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createIntermediateThrowEvent_2011(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(IntermediateThrowEventEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -919,13 +942,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createIntermediateCatchEvent_2012(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(IntermediateCatchEvent2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -963,13 +988,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createIntermediateCatchEvent_2013(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(IntermediateCatchEvent3EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1007,13 +1034,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createDataObject_2014(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(DataObjectEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1049,8 +1078,9 @@
FigureUtilities.RGBToInteger(fillRGB));
Node label5003 = createLabel(node,
Bpmn2VisualIDRegistry.getType(DataObjectNameEditPart.VISUAL_ID));
- label5003.setLayoutConstraint(NotationFactory.eINSTANCE
- .createLocation());
+// label5003.setLayoutConstraint(NotationFactory.eINSTANCE
+// .createLocation());
+ label5003.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
Location location5003 = (Location) label5003.getLayoutConstraint();
location5003.setX(0);
location5003.setY(5);
@@ -1058,13 +1088,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createTextAnnotation_2015(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(TextAnnotationEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1105,13 +1137,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createSubProcess_2016(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(SubProcessEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1149,13 +1183,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createScriptTask_2017(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(ScriptTaskEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1195,13 +1231,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createSubProcess_3001(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(SubProcess2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1238,12 +1276,14 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createUserTask_3002(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry.getType(UserTask2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
@@ -1281,13 +1321,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createServiceTask_3004(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(ServiceTask2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1327,13 +1369,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createStartEvent_3003(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(StartEvent3EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1370,13 +1414,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createStartEvent_3005(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(StartEvent4EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1413,12 +1459,14 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createEndEvent_3006(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry.getType(EndEvent4EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
@@ -1454,13 +1502,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createExclusiveGateway_3007(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(ExclusiveGateway2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1497,13 +1547,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createParallelGateway_3008(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(ParallelGateway2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1540,12 +1592,14 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createEndEvent_3009(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry.getType(EndEvent5EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
@@ -1581,12 +1635,14 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createEndEvent_3010(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry.getType(EndEvent6EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
@@ -1622,13 +1678,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createIntermediateCatchEvent_3011(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(IntermediateCatchEvent4EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1665,13 +1723,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createIntermediateThrowEvent_3012(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(IntermediateThrowEvent2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1708,13 +1768,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createIntermediateCatchEvent_3013(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(IntermediateCatchEvent5EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1751,13 +1813,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createDataObject_3014(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(DataObject2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1802,13 +1866,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createTextAnnotation_3015(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(TextAnnotation2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1848,13 +1914,15 @@
}
/**
- * @generated
+ * @generated not
*/
public Node createScriptTask_3016(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+// Shape node = NotationFactory.eINSTANCE.createShape();
+// node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ Shape node = BpmnNotationFactory.INSTANCE.createShape();
+ node.setLayoutConstraint(BpmnNotationFactory.INSTANCE.createBounds());
node.setType(Bpmn2VisualIDRegistry
.getType(ScriptTask2EditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -1894,21 +1962,25 @@
}
/**
- * @generated
+ * @generated not
*/
public Edge createSequenceFlow_4001(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
+// Connector edge = NotationFactory.eINSTANCE.createConnector();
+ Connector edge = BpmnNotationFactory.INSTANCE.createEdge();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
- .createRelativeBendpoints();
+// RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
+// .createRelativeBendpoints();
+ RelativeBendpoints bendpoints =
BpmnNotationFactory.INSTANCE.createRelativeBendpoints();
ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(
2);
points.add(new RelativeBendpoint());
points.add(new RelativeBendpoint());
bendpoints.setPoints(points);
edge.setBendpoints(bendpoints);
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
ViewUtil.insertChildView(containerView, edge, index, persisted);
edge.setType(Bpmn2VisualIDRegistry
.getType(SequenceFlowEditPart.VISUAL_ID));
@@ -2015,10 +2087,11 @@
}
/**
- * @generated
+ * @generated not
*/
private Node createLabel(View owner, String hint) {
- DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
+// DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
+ DecorationNode rv = BpmnNotationFactory.INSTANCE.createLabel();
rv.setType(hint);
ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
return rv;
Added:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnBendpointsImpl.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnBendpointsImpl.java
(rev 0)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnBendpointsImpl.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -0,0 +1,51 @@
+package org.jboss.tools.bpmn2.gmf.notation;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.di.BPMNEdge;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.dd.dc.DcFactory;
+import org.eclipse.dd.dc.Point;
+import org.eclipse.dd.di.DiagramElement;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
+import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
+import org.eclipse.gmf.runtime.notation.impl.RelativeBendpointsImpl;
+
+public class BpmnBendpointsImpl extends RelativeBendpointsImpl implements
+ RelativeBendpoints {
+
+ private Edge edge;
+
+ public void setEdge(Edge edge) {
+ this.edge = edge;
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public void setPoints(List newPoints) {
+ if (edge != null && edge instanceof BpmnEdgeImpl) {
+ List<Point> waypoints = (((BpmnEdgeImpl)edge).getBPMNEdge()).getWaypoint();
+ waypoints.clear();
+ if (newPoints != null) {
+ for (Object object : newPoints) {
+ if (object instanceof RelativeBendpoint) {
+ RelativeBendpoint relativeBendPoint = (RelativeBendpoint)object;
+ Point absoluteBendpoint = DcFactory.eINSTANCE.createPoint();
+ BPMNEdge bpmnEdge = ((BpmnEdgeImpl)edge).getBPMNEdge();
+ DiagramElement source = bpmnEdge.getSourceElement();
+ if (source != null && source instanceof BPMNShape) {
+ Bounds sourceBounds = ((BPMNShape)source).getBounds();
+ absoluteBendpoint.setX(sourceBounds.getX() + relativeBendPoint.getSourceX());
+ absoluteBendpoint.setY(sourceBounds.getY() + relativeBendPoint.getSourceY());
+ }
+ waypoints.add(absoluteBendpoint);
+ }
+ }
+ }
+ }
+ super.setPoints(newPoints);
+ }
+
+}
Property changes on:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnBendpointsImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnBoundsImpl.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnBoundsImpl.java
(rev 0)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnBoundsImpl.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -0,0 +1,122 @@
+package org.jboss.tools.bpmn2.gmf.notation;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.impl.BoundsImpl;
+
+public class BpmnBoundsImpl extends BoundsImpl implements Bounds {
+
+ org.eclipse.dd.dc.Bounds bpmnBounds = null;
+
+ public BpmnBoundsImpl(org.eclipse.dd.dc.Bounds bounds) {
+ this.bpmnBounds = bounds;
+ }
+
+ public void initialize(BpmnShapeImpl shape) {
+ assert shape != null;
+ super.setHeight((int)bpmnBounds.getHeight());
+ super.setWidth((int)bpmnBounds.getWidth());
+ LayoutConstraint layoutConstraint = shape.getLayoutConstraint();
+ if (layoutConstraint instanceof BpmnBoundsImpl) {
+ org.eclipse.dd.dc.Bounds bounds = getParentContainerBounds();
+ super.setX((int)(bpmnBounds.getX() - (bounds != null ? bounds.getX() : 0)));
+ super.setY((int)(bpmnBounds.getY() - (bounds != null ? bounds.getY() : 0)));
+ }
+ }
+
+ public org.eclipse.dd.dc.Bounds getBPMNBounds() {
+ return bpmnBounds;
+ }
+
+ public void setX(int newX) {
+ super.setX(newX);
+ bpmnBounds.setX(getAbsoluteX(newX));
+ adjustChildren();
+ }
+
+ public void setY(int newY) {
+ super.setY(newY);
+ bpmnBounds.setY(getAbsoluteY(newY));
+ adjustChildren();
+ }
+
+ public void setHeight(int newHeight) {
+ super.setHeight(newHeight);
+ bpmnBounds.setHeight(newHeight);
+ }
+
+ public void setWidth(int newWidth) {
+ super.setWidth(newWidth);
+ bpmnBounds.setWidth(newWidth);
+ }
+
+ private int getAbsoluteX(int x) {
+ int result = x;
+ org.eclipse.dd.dc.Bounds parentContainerBounds = getParentContainerBounds();
+ if (parentContainerBounds != null) {
+ result += parentContainerBounds.getX();
+ }
+ return result;
+ }
+
+ private int getAbsoluteY(int y) {
+ int result = y;
+ org.eclipse.dd.dc.Bounds parentContainerBounds = getParentContainerBounds();
+ if (parentContainerBounds != null) {
+ result += parentContainerBounds.getY();
+ }
+ return result;
+ }
+
+ private org.eclipse.dd.dc.Bounds getParentContainerBounds() {
+ org.eclipse.dd.dc.Bounds result = null;
+ BpmnShapeImpl parent = getParentContainer();
+ if (parent != null) {
+ LayoutConstraint layoutConstraint = parent.getLayoutConstraint();
+ if (layoutConstraint instanceof BpmnBoundsImpl) {
+ BpmnBoundsImpl bpmnBounds = (BpmnBoundsImpl)layoutConstraint;
+ result = bpmnBounds.getBPMNBounds();
+ }
+ }
+ return result;
+ }
+
+ private BpmnShapeImpl getParentContainer() {
+ BpmnShapeImpl parent = getParent();
+ if (parent != null) {
+ Object parentContainer = parent.eContainer();
+ if (parentContainer != null && parentContainer instanceof BpmnShapeImpl) {
+ return (BpmnShapeImpl)parentContainer;
+ }
+ }
+ return null;
+ }
+
+ private BpmnShapeImpl getParent() {
+ EObject parent = this.eContainer();
+ if (parent != null && parent instanceof BpmnShapeImpl) {
+ return (BpmnShapeImpl)parent;
+ }
+ return null;
+ }
+
+ private void adjustChildren() {
+ BpmnShapeImpl parent = getParent();
+ if (parent != null) {
+ for (Object child : parent.getChildren()) {
+ if (child instanceof BpmnShapeImpl) {
+ BpmnShapeImpl bpmnShape = (BpmnShapeImpl)child;
+ LayoutConstraint layoutConstraint = bpmnShape.getLayoutConstraint();
+ if (layoutConstraint != null && layoutConstraint instanceof BpmnBoundsImpl)
{
+ BpmnBoundsImpl bpmnBounds = (BpmnBoundsImpl)layoutConstraint;
+ // these calls reset the absolute coordinates of the adapted bounds object
+ bpmnBounds.setX(bpmnBounds.getX());
+ bpmnBounds.setY(bpmnBounds.getY());
+ }
+ }
+ }
+ }
+ }
+
+}
Property changes on:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnBoundsImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnDiagramImpl.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnDiagramImpl.java
(rev 0)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnDiagramImpl.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -0,0 +1,183 @@
+package org.jboss.tools.bpmn2.gmf.notation;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.bpmn2.Artifact;
+import org.eclipse.bpmn2.FlowElement;
+import org.eclipse.bpmn2.FlowNode;
+import org.eclipse.bpmn2.Process;
+import org.eclipse.bpmn2.FlowElementsContainer;
+import org.eclipse.bpmn2.SequenceFlow;
+import org.eclipse.bpmn2.SubProcess;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.di.BPMNEdge;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.dd.di.DiagramElement;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.impl.DiagramImpl;
+
+public class BpmnDiagramImpl extends DiagramImpl implements Diagram {
+
+ BPMNDiagram bpmnDiagram;
+
+ public BpmnDiagramImpl(BPMNDiagram diagram) {
+ this.bpmnDiagram = diagram;
+ initialize();
+ }
+
+ private void initialize() {
+ setType("bpmn2");
+ setElement(bpmnDiagram.getPlane().getBpmnElement());
+ setMeasurementUnit(MeasurementUnit.get("Pixel"));
+ initializeViews((FlowElementsContainer)this.getElement(), createViewMap());
+ }
+
+ private void initializeNodes(FlowElementsContainer parent, Map<EObject, View>
viewMap) {
+ for (FlowElement flowElement : parent.getFlowElements()) {
+ View view = viewMap.get(flowElement);
+ if (view == null) continue;
+ if (view instanceof BpmnShapeImpl) {
+ initializeShape(parent, flowElement, viewMap);
+ }
+ }
+ }
+
+ private void initializeArtifacts(FlowElementsContainer parent, Map<EObject, View>
viewMap) {
+ List<Artifact> artifacts = null;
+ if (parent instanceof Process) {
+ artifacts = ((Process)parent).getArtifacts();
+ } else if (parent instanceof SubProcess) {
+ artifacts = ((SubProcess)parent).getArtifacts();
+ }
+ if (artifacts == null) return;
+ for (Artifact artifact : artifacts) {
+ initializeShape(parent, artifact, viewMap);
+ }
+ }
+
+ private void initializeEdges(FlowElementsContainer parent, Map<EObject, View>
viewMap) {
+ for (FlowElement flowElement : parent.getFlowElements()) {
+ View view = viewMap.get(flowElement);
+ if (view == null) continue;
+ if (view instanceof BpmnEdgeImpl) {
+ initializeEdge(parent, flowElement, viewMap);
+ }
+ }
+ }
+
+ private void initializeViews(
+ FlowElementsContainer parent,
+ Map<EObject, View> viewMap) {
+ initializeNodes(parent, viewMap);
+ initializeArtifacts(parent, viewMap);
+ initializeEdges(parent, viewMap);
+ }
+
+ private void initializeEdge(FlowElementsContainer parent, EObject object,
Map<EObject, View> viewMap) {
+ View view = viewMap.get(object);
+ if (view != null && view instanceof BpmnEdgeImpl) {
+ BpmnEdgeImpl edge = (BpmnEdgeImpl)view;
+ View parentView = viewMap.get(parent);
+ if (parentView != null && parentView instanceof Diagram) {
+ edge.initialize((Diagram)parentView);
+ }
+ EObject bpmnElement = edge.getElement();
+ if (bpmnElement instanceof SequenceFlow) {
+ SequenceFlow sequenceFlow = (SequenceFlow)bpmnElement;
+ FlowNode source = sequenceFlow.getSourceRef();
+ FlowNode target = sequenceFlow.getTargetRef();
+ View sourceView = viewMap.get(source);
+ View targetView = viewMap.get(target);
+ edge.setSource(sourceView);
+ edge.setTarget(targetView);
+ }
+ }
+ }
+
+ private void initializeShape(
+ FlowElementsContainer parent,
+ EObject object,
+ Map<EObject, View> viewMap) {
+ View view = viewMap.get(object);
+ if (view != null && view instanceof BpmnShapeImpl) {
+ BpmnShapeImpl shape = (BpmnShapeImpl)view;
+ View parentView = viewMap.get(parent);
+ if (parentView != null) {
+ shape.initialize(parentView);
+ if (shape.getElement() instanceof FlowElementsContainer) {
+ initializeViews((FlowElementsContainer)shape.getElement(), viewMap);
+ }
+ }
+ }
+ }
+
+ private Map<EObject, View> createViewMap() {
+ List<DiagramElement> diagramElements = bpmnDiagram.getPlane().getPlaneElement();
+ Map<EObject, View> result = new HashMap<EObject, View>();
+ result.put(bpmnDiagram.getPlane().getBpmnElement(), this);
+ for (DiagramElement diagramElement : diagramElements) {
+ if (diagramElement instanceof BPMNShape) {
+ BPMNShape bpmnShape = (BPMNShape)diagramElement;
+ BpmnShapeImpl shape = BpmnNotationFactory.INSTANCE.createShape(bpmnShape);
+ result.put(bpmnShape.getBpmnElement(), shape);
+ } else if (diagramElement instanceof BPMNEdge) {
+ BPMNEdge bpmnEdge = (BPMNEdge)diagramElement;
+ BpmnEdgeImpl edge = BpmnNotationFactory.INSTANCE.createEdge(bpmnEdge);
+ result.put(bpmnEdge.getBpmnElement(), edge);
+ }
+ }
+ return result;
+ }
+
+ public void eNotify(Notification notifier) {
+ if (notifier.getEventType() == Notification.REMOVE) {
+ Object feature = notifier.getFeature();
+ if (feature instanceof EReference) {
+ String name = ((EReference) feature).getName();
+ Object oldValue = notifier.getOldValue();
+ if ("children".equals(name) && oldValue instanceof BpmnShapeImpl) {
+ removeDiagramElement(((BpmnShapeImpl)oldValue).getBPMNShape());
+ } else if ("edges".equals(name) && oldValue instanceof
BpmnEdgeImpl) {
+ removeDiagramElement(((BpmnEdgeImpl)oldValue).getBPMNEdge());
+ }
+ }
+ }
+ super.eNotify(notifier);
+ }
+
+ public void insertChild(View child) {
+ super.insertChild(child);
+ if (child instanceof BpmnShapeImpl) {
+ insertShape((BpmnShapeImpl) child);
+ }
+ }
+
+ @Override
+ public void insertEdge(Edge edge) {
+ super.insertEdge(edge);
+ if (edge instanceof BpmnEdgeImpl) {
+ insertEdge((BpmnEdgeImpl)edge);
+ }
+ }
+
+ protected void insertEdge(BpmnEdgeImpl edge) {
+ bpmnDiagram.getPlane().getPlaneElement().add(edge.getBPMNEdge());
+ }
+
+ protected void insertShape(BpmnShapeImpl shape) {
+ bpmnDiagram.getPlane().getPlaneElement().add(shape.getBPMNShape());
+ }
+
+ protected void removeDiagramElement(DiagramElement elementToRemove) {
+ bpmnDiagram.getPlane().getPlaneElement().remove(elementToRemove);
+ }
+
+}
Property changes on:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnDiagramImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnEdgeImpl.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnEdgeImpl.java
(rev 0)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnEdgeImpl.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -0,0 +1,86 @@
+package org.jboss.tools.bpmn2.gmf.notation;
+
+import java.util.ArrayList;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.di.BPMNEdge;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.gmf.runtime.notation.Bendpoints;
+import org.eclipse.gmf.runtime.notation.Connector;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
+import org.eclipse.gmf.runtime.notation.impl.ConnectorImpl;
+import org.jboss.tools.bpmn2.process.diagram.part.Bpmn2VisualIDRegistry;
+
+public class BpmnEdgeImpl extends ConnectorImpl implements Connector {
+
+ BPMNEdge bpmnEdge;
+
+ public BpmnEdgeImpl(BPMNEdge edge) {
+ this.bpmnEdge = edge;
+ }
+
+ public BPMNEdge getBPMNEdge() {
+ return bpmnEdge;
+ }
+
+ @Override
+ public void setElement(EObject newElement) {
+ super.setElement(newElement);
+ if (newElement instanceof BaseElement) {
+ bpmnEdge.setBpmnElement((BaseElement) newElement);
+ }
+ }
+
+ @Override
+ public void setBendpoints(Bendpoints bendpoints) {
+ if (bendpoints != null && bendpoints instanceof BpmnBendpointsImpl) {
+ BpmnBendpointsImpl bpmnBendpoints = (BpmnBendpointsImpl)bendpoints;
+ bpmnBendpoints.setEdge(this);
+ // force refresh of the points list
+ bpmnBendpoints.setPoints(bpmnBendpoints.getPoints());
+ }
+ super.setBendpoints(bendpoints);
+ }
+
+ @Override
+ public void setSource(View newSource) {
+ super.setSource(newSource);
+ // force refresh of the points list
+ ((BpmnBendpointsImpl)getBendpoints()).setPoints(((BpmnBendpointsImpl)getBendpoints()).getPoints());
+ }
+
+ public void initialize(Diagram parentView) {
+ initializeElement();
+ initializeBendpoints();
+ setType(Bpmn2VisualIDRegistry.getType(
+ Bpmn2VisualIDRegistry.getLinkWithClassVisualID(getElement())));
+ parentView.insertEdge(this);
+ }
+
+ private void initializeBendpoints() {
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ setBendpoints(bendpoints);
+
+ }
+
+ private void initializeElement() {
+ EObject element = bpmnEdge.getBpmnElement();
+ if (element != null) {
+ super.setElement(element);
+ }
+ }
+
+}
Property changes on:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnEdgeImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnLabelImpl.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnLabelImpl.java
(rev 0)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnLabelImpl.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -0,0 +1,39 @@
+package org.jboss.tools.bpmn2.gmf.notation;
+
+import org.eclipse.bpmn2.di.BPMNLabel;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.impl.DecorationNodeImpl;
+
+public class BpmnLabelImpl extends DecorationNodeImpl implements DecorationNode {
+
+ BPMNLabel bpmnLabel;
+
+ public BpmnLabelImpl(BPMNLabel label) {
+ this.bpmnLabel = label;
+ initializeLocation();
+ }
+
+ public BPMNLabel getBPMNLabel() {
+ return bpmnLabel;
+ }
+
+ private void initializeLocation() {
+ Bounds bounds = bpmnLabel.getBounds();
+ if (bounds != null) {
+ super.setLayoutConstraint(BpmnNotationFactory.INSTANCE
+ .createBounds(bounds));
+ }
+ }
+
+ @Override
+ public void setLayoutConstraint(LayoutConstraint layoutConstraint) {
+ super.setLayoutConstraint(layoutConstraint);
+ if (layoutConstraint instanceof BpmnBoundsImpl) {
+ bpmnLabel.setBounds(((BpmnBoundsImpl) layoutConstraint)
+ .getBPMNBounds());
+ }
+ }
+
+}
Property changes on:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnLabelImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnNotationFactory.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnNotationFactory.java
(rev 0)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnNotationFactory.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -0,0 +1,62 @@
+package org.jboss.tools.bpmn2.gmf.notation;
+
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.di.BPMNEdge;
+import org.eclipse.bpmn2.di.BPMNLabel;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.di.BpmnDiFactory;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.dd.dc.DcFactory;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+public class BpmnNotationFactory {
+
+ public static BpmnNotationFactory INSTANCE = new BpmnNotationFactory();
+
+ public BpmnEdgeImpl createEdge() {
+ BPMNEdge bpmnEdge = BpmnDiFactory.eINSTANCE.createBPMNEdge();
+ bpmnEdge.setId(EcoreUtil.generateUUID());
+ return createEdge(bpmnEdge);
+ }
+
+ public BpmnEdgeImpl createEdge(BPMNEdge bpmnEdge) {
+ return new BpmnEdgeImpl(bpmnEdge);
+ }
+
+ public BpmnShapeImpl createShape() {
+ BPMNShape bpmnShape = BpmnDiFactory.eINSTANCE.createBPMNShape();
+ bpmnShape.setId(EcoreUtil.generateUUID());
+ return createShape(bpmnShape);
+ }
+
+ public BpmnShapeImpl createShape(BPMNShape bpmnShape) {
+ return new BpmnShapeImpl(bpmnShape);
+ }
+
+ public BpmnLabelImpl createLabel() {
+ BPMNLabel bpmnLabel = BpmnDiFactory.eINSTANCE.createBPMNLabel();
+ bpmnLabel.setId(EcoreUtil.generateUUID());
+ return createLabel(bpmnLabel);
+ }
+
+ public BpmnLabelImpl createLabel(BPMNLabel label) {
+ return new BpmnLabelImpl(label);
+ }
+
+ public BpmnBoundsImpl createBounds() {
+ return createBounds(DcFactory.eINSTANCE.createBounds());
+ }
+
+ public BpmnBoundsImpl createBounds(Bounds bounds) {
+ return new BpmnBoundsImpl(bounds);
+ }
+
+ public BpmnDiagramImpl createDiagram(BPMNDiagram bpmnDiagram) {
+ return new BpmnDiagramImpl(bpmnDiagram);
+ }
+
+ public BpmnBendpointsImpl createRelativeBendpoints() {
+ return new BpmnBendpointsImpl();
+ }
+
+}
Property changes on:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnNotationFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnShapeImpl.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnShapeImpl.java
(rev 0)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnShapeImpl.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -0,0 +1,124 @@
+package org.jboss.tools.bpmn2.gmf.notation;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.di.BPMNLabel;
+import org.eclipse.bpmn2.di.BPMNPlane;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.impl.ShapeImpl;
+import org.jboss.tools.bpmn2.process.diagram.part.Bpmn2VisualIDRegistry;
+
+public class BpmnShapeImpl extends ShapeImpl implements Shape {
+
+ BPMNShape bpmnShape;
+
+ public BpmnShapeImpl(BPMNShape shape) {
+ this.bpmnShape = shape;
+ }
+
+ public void initialize(View parentView) {
+ initializeElement();
+ setType(Bpmn2VisualIDRegistry.getType(
+ Bpmn2VisualIDRegistry.getNodeVisualID(
+ parentView,
+ getElement())));
+ parentView.insertChild(this);
+ initializeBounds();
+ initializeLabel(parentView);
+ }
+
+ private void initializeElement() {
+ EObject element = bpmnShape.getBpmnElement();
+ if (element != null) {
+ super.setElement(element);
+ }
+ }
+
+ private void initializeLabel(View parentView) {
+ BPMNLabel bpmnLabel = bpmnShape.getLabel();
+ if (bpmnLabel != null) {
+ DecorationNode label = BpmnNotationFactory.INSTANCE.createLabel(bpmnLabel);
+ if (getElement() != null) {
+ int id = Bpmn2VisualIDRegistry.getLabelVisualId(parentView.getElement(),
getElement());
+ if (id != -1) {
+ label.setType(Bpmn2VisualIDRegistry.getType(id));
+ }
+ }
+ super.insertChild(label);
+ }
+ }
+
+ private void initializeBounds() {
+ Bounds bounds = bpmnShape.getBounds();
+ if (bounds != null) {
+ BpmnBoundsImpl bpmnBounds =
(BpmnBoundsImpl)BpmnNotationFactory.INSTANCE.createBounds(bounds);
+ super.setLayoutConstraint(bpmnBounds);
+ bpmnBounds.initialize(this);
+ }
+ }
+
+ public BPMNShape getBPMNShape() {
+ return bpmnShape;
+ }
+
+ @Override
+ public void setElement(EObject newElement) {
+ super.setElement(newElement);
+ if (newElement instanceof BaseElement) {
+ bpmnShape.setBpmnElement((BaseElement) newElement);
+ }
+ }
+
+ @Override
+ public void setLayoutConstraint(LayoutConstraint layoutConstraint) {
+ super.setLayoutConstraint(layoutConstraint);
+ if (layoutConstraint instanceof BpmnBoundsImpl) {
+ bpmnShape.setBounds(((BpmnBoundsImpl) layoutConstraint)
+ .getBPMNBounds());
+ }
+ }
+
+ @Override
+ public void insertChild(View child) {
+ super.insertChild(child);
+ if (child instanceof BpmnLabelImpl) {
+ insertLabel((BpmnLabelImpl) child);
+ } else if (child instanceof BpmnShapeImpl) {
+ insertShape((BpmnShapeImpl)child);
+ }
+ }
+
+ protected void insertLabel(BpmnLabelImpl label) {
+ bpmnShape.setLabel(label.getBPMNLabel());
+ }
+
+ protected void insertShape(BpmnShapeImpl shape) {
+ EObject container = bpmnShape.eContainer();
+ if (container instanceof BPMNPlane) {
+ BPMNPlane bpmnPlane = (BPMNPlane)container;
+ bpmnPlane.getPlaneElement().add(shape.getBPMNShape());
+ }
+ }
+
+ public void eNotify(Notification notifier) {
+ if (notifier.getEventType() == Notification.REMOVE) {
+ Object feature = notifier.getFeature();
+ if (feature instanceof EReference) {
+ String name = ((EReference) feature).getName();
+ Object oldValue = notifier.getOldValue();
+ if ("children".equals(name) && oldValue instanceof BpmnShapeImpl)
{
+ getDiagram().eNotify(notifier);
+ }
+ }
+ }
+ super.eNotify(notifier);
+ }
+
+}
Property changes on:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/gmf/notation/BpmnShapeImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/util/Bpmn2ResourceFactoryImpl.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/util/Bpmn2ResourceFactoryImpl.java
(rev 0)
+++
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/util/Bpmn2ResourceFactoryImpl.java 2010-11-22
10:05:24 UTC (rev 26816)
@@ -0,0 +1,97 @@
+package org.jboss.tools.bpmn2.util;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLResource.ResourceHandler;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.jboss.tools.bpmn2.gmf.notation.BpmnNotationFactory;
+
+public class Bpmn2ResourceFactoryImpl extends
org.eclipse.bpmn2.util.Bpmn2ResourceFactoryImpl {
+
+ private ResourceHandler resourceHandler = new Bpmn2ResourceHandlerImpl();
+
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = (XMLResource)super.createResource(uri);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_RESOURCE_HANDLER,
resourceHandler);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_RESOURCE_HANDLER,
resourceHandler);
+ return result;
+ }
+
+ class Bpmn2ResourceHandlerImpl implements ResourceHandler {
+
+ @Override
+ public void preLoad(XMLResource resource, InputStream inputStream,
+ Map<?, ?> options) {
+ }
+
+ @Override
+ public void postLoad(XMLResource resource, InputStream inputStream,
+ Map<?, ?> options) {
+ TreeIterator<EObject> contents = resource.getAllContents();
+ ArrayList<EObject> viewObjects = new ArrayList<EObject>();
+ while (contents.hasNext()) {
+ EObject obj = contents.next();
+ if (obj instanceof BPMNDiagram) {
+ viewObjects.add(createDiagram((BPMNDiagram)obj));
+ }
+ }
+ for (EObject viewObject : viewObjects) {
+ resource.getContents().add(viewObject);
+ }
+ }
+
+ private Diagram createDiagram(BPMNDiagram bpmnDiagram) {
+ return BpmnNotationFactory.INSTANCE.createDiagram(bpmnDiagram);
+ }
+
+ @Override
+ public void preSave(XMLResource resource, OutputStream outputStream,
+ Map<?, ?> options) {
+ }
+
+ private View getParentView(View candidate, View view) {
+ for (Object child : candidate.getVisibleChildren()) {
+ if (child == view) {
+ return candidate;
+ } else {
+ return getParentView((View)child, view);
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public void postSave(XMLResource resource, OutputStream outputStream,
+ Map<?, ?> options) {
+ }
+
+
+ }
+
+
+ private void prepareSave(Resource resource) {
+ EObject cur;
+ for (Iterator<EObject> iter = resource.getAllContents(); iter.hasNext();)
{
+ cur = iter.next();
+
+ EStructuralFeature idAttr = cur.eClass().getEIDAttribute();
+ if (idAttr != null && !cur.eIsSet(idAttr)) {
+ cur.eSet(idAttr, EcoreUtil.generateUUID());
+ }
+ }
+ }
+}
Property changes on:
trunk/bpmn/plugins/org.jboss.tools.bpmn2.process.diagram/src-custom/org/jboss/tools/bpmn2/util/Bpmn2ResourceFactoryImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain