Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2008-07-30 18:56:04 -0400
committerdstadnik2008-07-30 18:56:04 -0400
commit6444cf3744d155ea23261892dcba8a18900c22ef (patch)
tree0b2cb241a5b1a0026db484c4909b988d64c15835
parent0a8a90d18af413159f602eda1da6c34d6ddc1511 (diff)
downloadorg.eclipse.gmf-tooling-6444cf3744d155ea23261892dcba8a18900c22ef.tar.gz
org.eclipse.gmf-tooling-6444cf3744d155ea23261892dcba8a18900c22ef.tar.xz
org.eclipse.gmf-tooling-6444cf3744d155ea23261892dcba8a18900c22ef.zip
regenerated
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/plugin.properties6
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/plugin.xml16
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/commands/ReliableRouteCreateCommand.java31
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/commands/UnreliableRouteCreateCommand.java31
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/helpers/TaiPanBaseEditHelper.java18
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/BesiegePortOrderEditPart.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EscortShipsOrderEditPart.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortRegisterEditPart.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ReliableRouteEditPart.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipDestinationEditPart.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipRouteEditPart.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/UnreliableRouteEditPart.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryCanonicalEditPolicy.java11
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/BesiegePortOrderItemSemanticEditPolicy.java8
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxItemSemanticEditPolicy.java8
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EscortShipsOrderItemSemanticEditPolicy.java8
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemItemSemanticEditPolicy.java8
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortItemSemanticEditPolicy.java7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortRegisterItemSemanticEditPolicy.java8
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ReliableRouteItemSemanticEditPolicy.java7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipDestinationItemSemanticEditPolicy.java8
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipItemSemanticEditPolicy.java7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoCanonicalEditPolicy.java4
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipRouteItemSemanticEditPolicy.java8
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoCanonicalEditPolicy.java4
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/SmallItemsItemSemanticEditPolicy.java8
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanBaseItemSemanticEditPolicy.java79
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/UnreliableRouteItemSemanticEditPolicy.java7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipItemSemanticEditPolicy.java7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipLargeCargoCanonicalEditPolicy.java4
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipLargeCargoItemSemanticEditPolicy.java7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipSmallCargoCanonicalEditPolicy.java4
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipSmallCargoItemSemanticEditPolicy.java7
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/TaiPanDocumentProvider.java42
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/properties/TaiPanPropertiesLabelProvider.java57
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/providers/ElementInitializers.java12
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/providers/TaiPanElementTypes.java51
40 files changed, 400 insertions, 125 deletions
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/plugin.properties b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/plugin.properties
index 759eeb73c..4c6d443e0 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/plugin.properties
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/plugin.properties
@@ -54,3 +54,9 @@ metatype.name.BesiegePortOrder_4005=Besiege Port Order
metatype.name.EscortShipsOrder_4006=Escort Ships Order
metatype.name.PortRegister_4007=Port Register
+prefpage.org.eclipse.gmf.examples.taipan.diagram.general=TaiPan Diagram
+prefpage.org.eclipse.gmf.examples.taipan.diagram.appearance=Appearance
+prefpage.org.eclipse.gmf.examples.taipan.diagram.connections=Connections
+prefpage.org.eclipse.gmf.examples.taipan.diagram.printing=Printing
+prefpage.org.eclipse.gmf.examples.taipan.diagram.rulersAndGrid=Rulers And Grid
+prefpage.org.eclipse.gmf.examples.taipan.diagram.pathmaps=Pathmaps
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/plugin.xml b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/plugin.xml
index 70e34aa00..9998267ef 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/plugin.xml
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/plugin.xml
@@ -215,36 +215,36 @@ Contributors:
<?gmfgen generated="true"?>
<page
id="org.eclipse.gmf.examples.taipan.diagram.general"
- name="%preference.page.title.org.eclipse.gmf.examples.taipan.diagram.general"
+ name="%prefpage.org.eclipse.gmf.examples.taipan.diagram.general"
class="org.eclipse.gmf.examples.taipan.gmf.editor.preferences.DiagramGeneralPreferencePage">
</page>
<page
id="org.eclipse.gmf.examples.taipan.diagram.appearance"
- name="%preference.page.title.org.eclipse.gmf.examples.taipan.diagram.appearance"
+ name="%prefpage.org.eclipse.gmf.examples.taipan.diagram.appearance"
category="org.eclipse.gmf.examples.taipan.diagram.general"
class="org.eclipse.gmf.examples.taipan.gmf.editor.preferences.DiagramAppearancePreferencePage">
</page>
<page
id="org.eclipse.gmf.examples.taipan.diagram.connections"
- name="%preference.page.title.org.eclipse.gmf.examples.taipan.diagram.connections"
+ name="%prefpage.org.eclipse.gmf.examples.taipan.diagram.connections"
category="org.eclipse.gmf.examples.taipan.diagram.general"
class="org.eclipse.gmf.examples.taipan.gmf.editor.preferences.DiagramConnectionsPreferencePage">
</page>
<page
id="org.eclipse.gmf.examples.taipan.diagram.printing"
- name="%preference.page.title.org.eclipse.gmf.examples.taipan.diagram.printing"
+ name="%prefpage.org.eclipse.gmf.examples.taipan.diagram.printing"
category="org.eclipse.gmf.examples.taipan.diagram.general"
class="org.eclipse.gmf.examples.taipan.gmf.editor.preferences.DiagramPrintingPreferencePage">
</page>
<page
id="org.eclipse.gmf.examples.taipan.diagram.rulersAndGrid"
- name="%preference.page.title.org.eclipse.gmf.examples.taipan.diagram.rulersAndGrid"
+ name="%prefpage.org.eclipse.gmf.examples.taipan.diagram.rulersAndGrid"
category="org.eclipse.gmf.examples.taipan.diagram.general"
class="org.eclipse.gmf.examples.taipan.gmf.editor.preferences.DiagramRulersAndGridPreferencePage">
</page>
<page
id="org.eclipse.gmf.examples.taipan.diagram.pathmaps"
- name="%preference.page.title.org.eclipse.gmf.examples.taipan.diagram.pathmaps"
+ name="%prefpage.org.eclipse.gmf.examples.taipan.diagram.pathmaps"
category="org.eclipse.gmf.examples.taipan.diagram.general"
class="org.eclipse.gmf.runtime.emf.ui.preferences.PathmapsPreferencePage">
</page>
@@ -503,14 +503,14 @@ Contributors:
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
<?gmfgen generated="true"?>
- <clientContext id="TaiPanClientContext">
+ <clientContext id="org.eclipse.gmf.examples.taipan.gmf.editor.TypeContext">
<enablement>
<test
property="org.eclipse.gmf.runtime.emf.core.editingDomain"
value="org.eclipse.gmf.examples.taipan.gmf.editor.EditingDomain"/>
</enablement>
</clientContext>
- <binding context="TaiPanClientContext">
+ <binding context="org.eclipse.gmf.examples.taipan.gmf.editor.TypeContext">
<elementType ref="org.eclipse.gmf.examples.taipan.gmf.editor.Aquatory_1000"/>
<elementType ref="org.eclipse.gmf.examples.taipan.gmf.editor.Port_2001"/>
<elementType ref="org.eclipse.gmf.examples.taipan.gmf.editor.Ship_2002"/>
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/commands/ReliableRouteCreateCommand.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/commands/ReliableRouteCreateCommand.java
index 699949052..bc16af246 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/commands/ReliableRouteCreateCommand.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/commands/ReliableRouteCreateCommand.java
@@ -46,7 +46,7 @@ public class ReliableRouteCreateCommand extends CreateElementCommand {
/**
* @generated
*/
- private Aquatory container;
+ private final Aquatory container;
/**
* @generated
@@ -59,15 +59,9 @@ public class ReliableRouteCreateCommand extends CreateElementCommand {
setContainmentFeature(TaiPanPackage.eINSTANCE.getAquatory_Routes());
}
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null; element = element.eContainer()) {
- if (element instanceof Aquatory) {
- container = (Aquatory) element;
- super.setElementToEdit(container);
- break;
- }
+ container = deduceContainer(source, target);
+ if (container != null) {
+ super.setElementToEdit(container);
}
}
@@ -160,4 +154,21 @@ public class ReliableRouteCreateCommand extends CreateElementCommand {
public Aquatory getContainer() {
return container;
}
+
+ /**
+ * Default approach is to traverse ancestors of the source to find instance of container.
+ * Modify with appropriate logic.
+ * @generated
+ */
+ private static Aquatory deduceContainer(EObject source, EObject target) {
+ // Find container element for the new link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null; element = element.eContainer()) {
+ if (element instanceof Aquatory) {
+ return (Aquatory) element;
+ }
+ }
+ return null;
+ }
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/commands/UnreliableRouteCreateCommand.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/commands/UnreliableRouteCreateCommand.java
index f11a9cb5c..a95cab69c 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/commands/UnreliableRouteCreateCommand.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/commands/UnreliableRouteCreateCommand.java
@@ -46,7 +46,7 @@ public class UnreliableRouteCreateCommand extends CreateElementCommand {
/**
* @generated
*/
- private Aquatory container;
+ private final Aquatory container;
/**
* @generated
@@ -59,15 +59,9 @@ public class UnreliableRouteCreateCommand extends CreateElementCommand {
setContainmentFeature(TaiPanPackage.eINSTANCE.getAquatory_Routes());
}
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null; element = element.eContainer()) {
- if (element instanceof Aquatory) {
- container = (Aquatory) element;
- super.setElementToEdit(container);
- break;
- }
+ container = deduceContainer(source, target);
+ if (container != null) {
+ super.setElementToEdit(container);
}
}
@@ -160,4 +154,21 @@ public class UnreliableRouteCreateCommand extends CreateElementCommand {
public Aquatory getContainer() {
return container;
}
+
+ /**
+ * Default approach is to traverse ancestors of the source to find instance of container.
+ * Modify with appropriate logic.
+ * @generated
+ */
+ private static Aquatory deduceContainer(EObject source, EObject target) {
+ // Find container element for the new link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null; element = element.eContainer()) {
+ if (element instanceof Aquatory) {
+ return (Aquatory) element;
+ }
+ }
+ return null;
+ }
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/helpers/TaiPanBaseEditHelper.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/helpers/TaiPanBaseEditHelper.java
index be875966f..b682933d5 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/helpers/TaiPanBaseEditHelper.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/helpers/TaiPanBaseEditHelper.java
@@ -13,7 +13,10 @@ package org.eclipse.gmf.examples.taipan.gmf.editor.edit.helpers;
import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
@@ -33,6 +36,21 @@ public class TaiPanBaseEditHelper extends AbstractEditHelper {
/**
* @generated
*/
+ public static final String CONTEXT_ELEMENT_TYPE = "context element type"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ protected IEditHelperAdvice[] getEditHelperAdvice(IEditCommandRequest req) {
+ if (req.getParameter(CONTEXT_ELEMENT_TYPE) instanceof IElementType) {
+ return ElementTypeRegistry.getInstance().getEditHelperAdvice((IElementType) req.getParameter(CONTEXT_ELEMENT_TYPE));
+ }
+ return super.getEditHelperAdvice(req);
+ }
+
+ /**
+ * @generated
+ */
protected ICommand getInsteadCommand(IEditCommandRequest req) {
ICommand epCommand = (ICommand) req.getParameter(EDIT_POLICY_COMMAND);
req.setParameter(EDIT_POLICY_COMMAND, null);
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/BesiegePortOrderEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/BesiegePortOrderEditPart.java
index e151cdb22..e178d3731 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/BesiegePortOrderEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/BesiegePortOrderEditPart.java
@@ -15,13 +15,14 @@ import org.eclipse.draw2d.Connection;
import org.eclipse.gmf.examples.taipan.figures.ArrowConnection;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.BesiegePortOrderItemSemanticEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
*/
-public class BesiegePortOrderEditPart extends ConnectionNodeEditPart {
+public class BesiegePortOrderEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart {
/**
* @generated
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EscortShipsOrderEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EscortShipsOrderEditPart.java
index 2940670ef..3baf43e91 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EscortShipsOrderEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EscortShipsOrderEditPart.java
@@ -15,13 +15,14 @@ import org.eclipse.draw2d.Connection;
import org.eclipse.gmf.examples.taipan.figures.ThickDirectedConnection;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.EscortShipsOrderItemSemanticEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
*/
-public class EscortShipsOrderEditPart extends ConnectionNodeEditPart {
+public class EscortShipsOrderEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart {
/**
* @generated
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortRegisterEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortRegisterEditPart.java
index a979e1874..d0197cf03 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortRegisterEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortRegisterEditPart.java
@@ -15,13 +15,14 @@ import org.eclipse.draw2d.Connection;
import org.eclipse.gmf.examples.taipan.figures.DashedConnection;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.PortRegisterItemSemanticEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
*/
-public class PortRegisterEditPart extends ConnectionNodeEditPart {
+public class PortRegisterEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart {
/**
* @generated
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ReliableRouteEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ReliableRouteEditPart.java
index 9258e9ad6..fb4f65a4a 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ReliableRouteEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ReliableRouteEditPart.java
@@ -15,6 +15,7 @@ import org.eclipse.draw2d.Connection;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.ReliableRouteItemSemanticEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
import org.eclipse.gmf.runtime.notation.View;
@@ -22,7 +23,7 @@ import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
*/
-public class ReliableRouteEditPart extends ConnectionNodeEditPart {
+public class ReliableRouteEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart {
/**
* @generated
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipDestinationEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipDestinationEditPart.java
index 97b4c6747..7d0f5fc1b 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipDestinationEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipDestinationEditPart.java
@@ -16,13 +16,14 @@ import org.eclipse.gef.EditPart;
import org.eclipse.gmf.examples.taipan.figures.DirectedConnection;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.ShipDestinationItemSemanticEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
*/
-public class ShipDestinationEditPart extends ConnectionNodeEditPart {
+public class ShipDestinationEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart {
/**
* @generated
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipRouteEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipRouteEditPart.java
index 7fbfdf062..0de36c26c 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipRouteEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipRouteEditPart.java
@@ -15,13 +15,14 @@ import org.eclipse.draw2d.Connection;
import org.eclipse.gmf.examples.taipan.figures.DirectedConnection;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.ShipRouteItemSemanticEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
*/
-public class ShipRouteEditPart extends ConnectionNodeEditPart {
+public class ShipRouteEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart {
/**
* @generated
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/UnreliableRouteEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/UnreliableRouteEditPart.java
index e3336bf8b..32fb83084 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/UnreliableRouteEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/UnreliableRouteEditPart.java
@@ -16,13 +16,14 @@ import org.eclipse.gef.EditPart;
import org.eclipse.gmf.examples.taipan.figures.DashedConnection;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.UnreliableRouteItemSemanticEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
*/
-public class UnreliableRouteEditPart extends ConnectionNodeEditPart {
+public class UnreliableRouteEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart {
/**
* @generated
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryCanonicalEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryCanonicalEditPolicy.java
index 121d80c0b..c5c78e865 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryCanonicalEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryCanonicalEditPolicy.java
@@ -93,7 +93,9 @@ public class AquatoryCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
case PortEditPart.VISUAL_ID:
case ShipEditPart.VISUAL_ID:
case WarshipEditPart.VISUAL_ID:
- return !semanticChildren.contains(view.getElement()) || visualID != TaiPanVisualIDRegistry.getNodeVisualID((View) getHost().getModel(), view.getElement());
+ if (!semanticChildren.contains(view.getElement())) {
+ return true;
+ }
}
return false;
}
@@ -191,12 +193,13 @@ public class AquatoryCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
EObject diagramLinkObject = nextDiagramLink.getElement();
EObject diagramLinkSrc = nextDiagramLink.getSource().getElement();
EObject diagramLinkDst = nextDiagramLink.getTarget().getElement();
- for (Iterator LinkDescriptorsIterator = linkDescriptors.iterator(); LinkDescriptorsIterator.hasNext();) {
- TaiPanLinkDescriptor nextLinkDescriptor = (TaiPanLinkDescriptor) LinkDescriptorsIterator.next();
+ for (Iterator linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator.hasNext();) {
+ TaiPanLinkDescriptor nextLinkDescriptor = (TaiPanLinkDescriptor) linkDescriptorsIterator.next();
if (diagramLinkObject == nextLinkDescriptor.getModelElement() && diagramLinkSrc == nextLinkDescriptor.getSource() && diagramLinkDst == nextLinkDescriptor.getDestination()
&& diagramLinkVisualID == nextLinkDescriptor.getVisualID()) {
linksIterator.remove();
- LinkDescriptorsIterator.remove();
+ linkDescriptorsIterator.remove();
+ break;
}
}
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java
index fabf5e678..69d5f8883 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java
@@ -31,6 +31,13 @@ public class AquatoryItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPo
/**
* @generated
*/
+ public AquatoryItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.Aquatory_1000);
+ }
+
+ /**
+ * @generated
+ */
protected Command getCreateCommand(CreateElementRequest req) {
if (TaiPanElementTypes.Port_2001 == req.getElementType()) {
if (req.getContainmentFeature() == null) {
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/BesiegePortOrderItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/BesiegePortOrderItemSemanticEditPolicy.java
index f90400b76..1d689cc35 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/BesiegePortOrderItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/BesiegePortOrderItemSemanticEditPolicy.java
@@ -12,6 +12,7 @@
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
@@ -23,6 +24,13 @@ public class BesiegePortOrderItemSemanticEditPolicy extends TaiPanBaseItemSemant
/**
* @generated
*/
+ public BesiegePortOrderItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.BesiegePortOrder_4005);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyElementCommand(DestroyElementRequest req) {
return getGEFWrapper(new DestroyElementCommand(req));
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxItemSemanticEditPolicy.java
index 8552e9dc3..d6b688ac0 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxItemSemanticEditPolicy.java
@@ -13,6 +13,7 @@ package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
@@ -24,6 +25,13 @@ public class EmptyBoxItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPo
/**
* @generated
*/
+ public EmptyBoxItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.EmptyBox_3003);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyElementCommand(DestroyElementRequest req) {
CompoundCommand cc = getDestroyEdgesCommand();
addDestroyShortcutsCommand(cc);
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EscortShipsOrderItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EscortShipsOrderItemSemanticEditPolicy.java
index fca124d23..f0c29f2c6 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EscortShipsOrderItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EscortShipsOrderItemSemanticEditPolicy.java
@@ -12,6 +12,7 @@
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
@@ -23,6 +24,13 @@ public class EscortShipsOrderItemSemanticEditPolicy extends TaiPanBaseItemSemant
/**
* @generated
*/
+ public EscortShipsOrderItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.EscortShipsOrder_4006);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyElementCommand(DestroyElementRequest req) {
return getGEFWrapper(new DestroyElementCommand(req));
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemItemSemanticEditPolicy.java
index 90e790a8e..fa4d6bcaa 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemItemSemanticEditPolicy.java
@@ -13,6 +13,7 @@ package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
@@ -24,6 +25,13 @@ public class LargeItemItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditP
/**
* @generated
*/
+ public LargeItemItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.LargeItem_3002);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyElementCommand(DestroyElementRequest req) {
CompoundCommand cc = getDestroyEdgesCommand();
addDestroyShortcutsCommand(cc);
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortItemSemanticEditPolicy.java
index 0f802fc5e..92b256ceb 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortItemSemanticEditPolicy.java
@@ -44,6 +44,13 @@ public class PortItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPolicy
/**
* @generated
*/
+ public PortItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.Port_2001);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyElementCommand(DestroyElementRequest req) {
CompoundCommand cc = getDestroyEdgesCommand();
addDestroyShortcutsCommand(cc);
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortRegisterItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortRegisterItemSemanticEditPolicy.java
index ce3aec549..fc2f436ef 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortRegisterItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortRegisterItemSemanticEditPolicy.java
@@ -12,6 +12,7 @@
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
@@ -23,6 +24,13 @@ public class PortRegisterItemSemanticEditPolicy extends TaiPanBaseItemSemanticEd
/**
* @generated
*/
+ public PortRegisterItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.PortRegister_4007);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ReliableRouteItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ReliableRouteItemSemanticEditPolicy.java
index e95720e72..d795709f8 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ReliableRouteItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ReliableRouteItemSemanticEditPolicy.java
@@ -36,6 +36,13 @@ public class ReliableRouteItemSemanticEditPolicy extends TaiPanBaseItemSemanticE
/**
* @generated
*/
+ public ReliableRouteItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.Route_4002);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyElementCommand(DestroyElementRequest req) {
return getGEFWrapper(new DestroyElementCommand(req));
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipDestinationItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipDestinationItemSemanticEditPolicy.java
index 71b75874b..f62e38d53 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipDestinationItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipDestinationItemSemanticEditPolicy.java
@@ -12,6 +12,7 @@
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
@@ -23,6 +24,13 @@ public class ShipDestinationItemSemanticEditPolicy extends TaiPanBaseItemSemanti
/**
* @generated
*/
+ public ShipDestinationItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.ShipDestination_4001);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipItemSemanticEditPolicy.java
index 6bf7b8f6b..5bf8ec9b4 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipItemSemanticEditPolicy.java
@@ -51,6 +51,13 @@ public class ShipItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPolicy
/**
* @generated
*/
+ public ShipItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.Ship_2002);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyElementCommand(DestroyElementRequest req) {
CompoundCommand cc = getDestroyEdgesCommand();
addDestroyChildNodesCommand(cc);
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoCanonicalEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoCanonicalEditPolicy.java
index 666ab1c7c..b8faeb039 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoCanonicalEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoCanonicalEditPolicy.java
@@ -57,7 +57,9 @@ public class ShipLargeCargoCanonicalEditPolicy extends CanonicalEditPolicy {
switch (visualID) {
case LargeItemEditPart.VISUAL_ID:
case EmptyBoxEditPart.VISUAL_ID:
- return !semanticChildren.contains(view.getElement()) || visualID != TaiPanVisualIDRegistry.getNodeVisualID((View) getHost().getModel(), view.getElement());
+ if (!semanticChildren.contains(view.getElement())) {
+ return true;
+ }
}
return false;
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java
index e41a3db52..0db37f8fb 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java
@@ -26,6 +26,13 @@ public class ShipLargeCargoItemSemanticEditPolicy extends TaiPanBaseItemSemantic
/**
* @generated
*/
+ public ShipLargeCargoItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.Ship_2002);
+ }
+
+ /**
+ * @generated
+ */
protected Command getCreateCommand(CreateElementRequest req) {
if (TaiPanElementTypes.LargeItem_3002 == req.getElementType()) {
if (req.getContainmentFeature() == null) {
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipRouteItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipRouteItemSemanticEditPolicy.java
index c46d6d0b8..e9ea8a936 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipRouteItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipRouteItemSemanticEditPolicy.java
@@ -12,6 +12,7 @@
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
@@ -23,6 +24,13 @@ public class ShipRouteItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditP
/**
* @generated
*/
+ public ShipRouteItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.ShipRoute_4004);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoCanonicalEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoCanonicalEditPolicy.java
index 736e24fac..9ad11a872 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoCanonicalEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoCanonicalEditPolicy.java
@@ -55,7 +55,9 @@ public class ShipSmallCargoCanonicalEditPolicy extends CanonicalEditPolicy {
int visualID = TaiPanVisualIDRegistry.getVisualID(view);
switch (visualID) {
case SmallItemsEditPart.VISUAL_ID:
- return !semanticChildren.contains(view.getElement()) || visualID != TaiPanVisualIDRegistry.getNodeVisualID((View) getHost().getModel(), view.getElement());
+ if (!semanticChildren.contains(view.getElement())) {
+ return true;
+ }
}
return false;
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java
index 05fbf4072..3733cc500 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java
@@ -25,6 +25,13 @@ public class ShipSmallCargoItemSemanticEditPolicy extends TaiPanBaseItemSemantic
/**
* @generated
*/
+ public ShipSmallCargoItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.Ship_2002);
+ }
+
+ /**
+ * @generated
+ */
protected Command getCreateCommand(CreateElementRequest req) {
if (TaiPanElementTypes.SmallItems_3001 == req.getElementType()) {
if (req.getContainmentFeature() == null) {
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/SmallItemsItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/SmallItemsItemSemanticEditPolicy.java
index 057164ca8..4713d7e2d 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/SmallItemsItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/SmallItemsItemSemanticEditPolicy.java
@@ -13,6 +13,7 @@ package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
@@ -24,6 +25,13 @@ public class SmallItemsItemSemanticEditPolicy extends TaiPanBaseItemSemanticEdit
/**
* @generated
*/
+ public SmallItemsItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.SmallItems_3001);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyElementCommand(DestroyElementRequest req) {
CompoundCommand cc = getDestroyEdgesCommand();
addDestroyShortcutsCommand(cc);
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanBaseItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanBaseItemSemanticEditPolicy.java
index 8ee618336..a90d76426 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanBaseItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanBaseItemSemanticEditPolicy.java
@@ -36,6 +36,7 @@ import org.eclipse.gmf.examples.taipan.gmf.editor.expressions.TaiPanAbstractExpr
import org.eclipse.gmf.examples.taipan.gmf.editor.expressions.TaiPanOCLFactory;
import org.eclipse.gmf.examples.taipan.gmf.editor.part.TaiPanDiagramEditorPlugin;
import org.eclipse.gmf.examples.taipan.gmf.editor.part.TaiPanVisualIDRegistry;
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
@@ -77,6 +78,18 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
public static final String VISUAL_ID_KEY = "visual_id"; //$NON-NLS-1$
/**
+ * @generated
+ */
+ private final IElementType myElementType;
+
+ /**
+ * @generated
+ */
+ protected TaiPanBaseItemSemanticEditPolicy(IElementType elementType) {
+ myElementType = elementType;
+ }
+
+ /**
* Extended request data key to hold editpart visual id.
* Add visual id of edited editpart to extended data of the request
* so command switch can decide what kind of diagram element is being edited.
@@ -111,33 +124,8 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
protected Command getSemanticCommand(IEditCommandRequest request) {
IEditCommandRequest completedRequest = completeRequest(request);
- Object editHelperContext = completedRequest.getEditHelperContext();
- if (editHelperContext instanceof View || (editHelperContext instanceof IEditHelperContext && ((IEditHelperContext) editHelperContext).getEObject() instanceof View)) {
- // no semantic commands are provided for pure design elements
- return null;
- }
- if (editHelperContext == null) {
- editHelperContext = ViewUtil.resolveSemanticElement((View) getHost().getModel());
- }
- IElementType elementType = ElementTypeRegistry.getInstance().getElementType(editHelperContext);
- if (elementType == ElementTypeRegistry.getInstance().getType("org.eclipse.gmf.runtime.emf.type.core.default")) { //$NON-NLS-1$
- elementType = null;
- }
Command semanticCommand = getSemanticCommandSwitch(completedRequest);
- if (semanticCommand != null) {
- ICommand command = semanticCommand instanceof ICommandProxy ? ((ICommandProxy) semanticCommand).getICommand() : new CommandProxy(semanticCommand);
- completedRequest.setParameter(TaiPanBaseEditHelper.EDIT_POLICY_COMMAND, command);
- }
- if (elementType != null) {
- ICommand command = elementType.getEditCommand(completedRequest);
- if (command != null) {
- if (!(command instanceof CompositeTransactionalCommand)) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
- command = new CompositeTransactionalCommand(editingDomain, command.getLabel()).compose(command);
- }
- semanticCommand = new ICommandProxy(command);
- }
- }
+ semanticCommand = getEditHelperCommand(completedRequest, semanticCommand);
boolean shouldProceed = true;
if (completedRequest instanceof DestroyRequest) {
shouldProceed = shouldProceed((DestroyRequest) completedRequest);
@@ -156,6 +144,37 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
+ private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
+ if (editPolicyCommand != null) {
+ ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
+ request.setParameter(TaiPanBaseEditHelper.EDIT_POLICY_COMMAND, command);
+ }
+ IElementType requestContextElementType = getContextElementType(request);
+ request.setParameter(TaiPanBaseEditHelper.CONTEXT_ELEMENT_TYPE, requestContextElementType);
+ ICommand command = requestContextElementType.getEditCommand(request);
+ request.setParameter(TaiPanBaseEditHelper.EDIT_POLICY_COMMAND, null);
+ request.setParameter(TaiPanBaseEditHelper.CONTEXT_ELEMENT_TYPE, null);
+ if (command != null) {
+ if (!(command instanceof CompositeTransactionalCommand)) {
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ command = new CompositeTransactionalCommand(editingDomain, command.getLabel()).compose(command);
+ }
+ return new ICommandProxy(command);
+ }
+ return editPolicyCommand;
+ }
+
+ /**
+ * @generated
+ */
+ private IElementType getContextElementType(IEditCommandRequest request) {
+ IElementType requestContextElementType = TaiPanElementTypes.getElementType(getVisualID(request));
+ return requestContextElementType != null ? requestContextElementType : myElementType;
+ }
+
+ /**
+ * @generated
+ */
protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
if (req instanceof CreateRelationshipRequest) {
return getCreateRelationshipCommand((CreateRelationshipRequest) req);
@@ -371,6 +390,7 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
return false;
}
}
+
return canExistShipDestination_4001(source, target);
}
@@ -397,6 +417,7 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
return false;
}
}
+
return canExistShipRoute_4004(source, target);
}
@@ -428,6 +449,7 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
return false;
}
}
+
return canExistPortRegister_4007(source, target);
}
@@ -435,7 +457,6 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static boolean canExistShipDestination_4001(Ship source, Port target) {
-
return true;
}
@@ -443,7 +464,6 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static boolean canExistRoute_4002(Aquatory container, Destination source, Destination target) {
-
return true;
}
@@ -451,7 +471,6 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static boolean canExistRoute_4003(Aquatory container, Destination source, Destination target) {
-
return true;
}
@@ -459,7 +478,6 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static boolean canExistShipRoute_4004(Ship source, Route target) {
-
return true;
}
@@ -526,7 +544,6 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static boolean canExistPortRegister_4007(Port source, Ship target) {
-
return true;
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/UnreliableRouteItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/UnreliableRouteItemSemanticEditPolicy.java
index 10257cb37..ce6351d83 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/UnreliableRouteItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/UnreliableRouteItemSemanticEditPolicy.java
@@ -36,6 +36,13 @@ public class UnreliableRouteItemSemanticEditPolicy extends TaiPanBaseItemSemanti
/**
* @generated
*/
+ public UnreliableRouteItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.Route_4003);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyElementCommand(DestroyElementRequest req) {
return getGEFWrapper(new DestroyElementCommand(req));
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipItemSemanticEditPolicy.java
index cd8bdcc55..3b1906ecd 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipItemSemanticEditPolicy.java
@@ -54,6 +54,13 @@ public class WarshipItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPol
/**
* @generated
*/
+ public WarshipItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.Warship_2003);
+ }
+
+ /**
+ * @generated
+ */
protected Command getDestroyElementCommand(DestroyElementRequest req) {
CompoundCommand cc = getDestroyEdgesCommand();
addDestroyChildNodesCommand(cc);
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipLargeCargoCanonicalEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipLargeCargoCanonicalEditPolicy.java
index 7abcdb4eb..52c7cfe34 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipLargeCargoCanonicalEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipLargeCargoCanonicalEditPolicy.java
@@ -57,7 +57,9 @@ public class WarshipLargeCargoCanonicalEditPolicy extends CanonicalEditPolicy {
switch (visualID) {
case LargeItemEditPart.VISUAL_ID:
case EmptyBoxEditPart.VISUAL_ID:
- return !semanticChildren.contains(view.getElement()) || visualID != TaiPanVisualIDRegistry.getNodeVisualID((View) getHost().getModel(), view.getElement());
+ if (!semanticChildren.contains(view.getElement())) {
+ return true;
+ }
}
return false;
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipLargeCargoItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipLargeCargoItemSemanticEditPolicy.java
index fc35f1c90..831187439 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipLargeCargoItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipLargeCargoItemSemanticEditPolicy.java
@@ -26,6 +26,13 @@ public class WarshipLargeCargoItemSemanticEditPolicy extends TaiPanBaseItemSeman
/**
* @generated
*/
+ public WarshipLargeCargoItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.Warship_2003);
+ }
+
+ /**
+ * @generated
+ */
protected Command getCreateCommand(CreateElementRequest req) {
if (TaiPanElementTypes.LargeItem_3002 == req.getElementType()) {
if (req.getContainmentFeature() == null) {
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipSmallCargoCanonicalEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipSmallCargoCanonicalEditPolicy.java
index 9307d2c49..6666844c9 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipSmallCargoCanonicalEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipSmallCargoCanonicalEditPolicy.java
@@ -55,7 +55,9 @@ public class WarshipSmallCargoCanonicalEditPolicy extends CanonicalEditPolicy {
int visualID = TaiPanVisualIDRegistry.getVisualID(view);
switch (visualID) {
case SmallItemsEditPart.VISUAL_ID:
- return !semanticChildren.contains(view.getElement()) || visualID != TaiPanVisualIDRegistry.getNodeVisualID((View) getHost().getModel(), view.getElement());
+ if (!semanticChildren.contains(view.getElement())) {
+ return true;
+ }
}
return false;
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipSmallCargoItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipSmallCargoItemSemanticEditPolicy.java
index 7d51fa485..2c357c0f9 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipSmallCargoItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipSmallCargoItemSemanticEditPolicy.java
@@ -25,6 +25,13 @@ public class WarshipSmallCargoItemSemanticEditPolicy extends TaiPanBaseItemSeman
/**
* @generated
*/
+ public WarshipSmallCargoItemSemanticEditPolicy() {
+ super(TaiPanElementTypes.Warship_2003);
+ }
+
+ /**
+ * @generated
+ */
protected Command getCreateCommand(CreateElementRequest req) {
if (TaiPanElementTypes.SmallItems_3001 == req.getElementType()) {
if (req.getContainmentFeature() == null) {
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/TaiPanDocumentProvider.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/TaiPanDocumentProvider.java
index 6ad4235c9..4671fa6ba 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/TaiPanDocumentProvider.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/part/TaiPanDocumentProvider.java
@@ -121,7 +121,7 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
*/
private long computeModificationStamp(ResourceSetInfo info) {
int result = 0;
- for (Iterator it = info.getResourceSet().getResources().iterator(); it.hasNext();) {
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
if (file != null) {
@@ -294,8 +294,8 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
protected void doValidateState(Object element, Object computationContext) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- Collection files2Validate = new ArrayList();
- for (Iterator it = info.getResourceSet().getResources().iterator(); it.hasNext();) {
+ Collection/*<org.eclipse.core.resources.IFile>*/files2Validate = new ArrayList/*<org.eclipse.core.resources.IFile>*/();
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
if (file != null && file.isReadOnly()) {
@@ -357,7 +357,7 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
protected void updateCache(Object element) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- for (Iterator it = info.getResourceSet().getResources().iterator(); it.hasNext();) {
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
if (file != null && file.isReadOnly()) {
@@ -400,8 +400,8 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
protected ISchedulingRule getResetRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- Collection rules = new ArrayList();
- for (Iterator it = info.getResourceSet().getResources().iterator(); it.hasNext();) {
+ Collection/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/rules = new ArrayList/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/();
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
if (file != null) {
@@ -419,8 +419,8 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
protected ISchedulingRule getSaveRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- Collection rules = new ArrayList();
- for (Iterator it = info.getResourceSet().getResources().iterator(); it.hasNext();) {
+ Collection/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/rules = new ArrayList/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/();
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
if (file != null) {
@@ -438,8 +438,8 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
protected ISchedulingRule getSynchronizeRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- Collection rules = new ArrayList();
- for (Iterator it = info.getResourceSet().getResources().iterator(); it.hasNext();) {
+ Collection/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/rules = new ArrayList/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/();
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
if (file != null) {
@@ -457,8 +457,8 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
protected ISchedulingRule getValidateStateRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- Collection files = new ArrayList();
- for (Iterator it = info.getResourceSet().getResources().iterator(); it.hasNext();) {
+ Collection/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/files = new ArrayList/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/();
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
IFile file = WorkspaceSynchronizer.getFile(nextResource);
if (file != null) {
@@ -498,7 +498,7 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- for (Iterator it = info.getResourceSet().getResources().iterator(); it.hasNext();) {
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
handleElementChanged(info, nextResource, monitor);
}
@@ -518,10 +518,9 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
}
info.stopResourceListening();
fireElementStateChanging(element);
- List resources = info.getResourceSet().getResources();
try {
- monitor.beginTask(Messages.TaiPanDocumentProvider_SaveDiagramTask, resources.size() + 1); //"Saving diagram"
- for (Iterator it = resources.iterator(); it.hasNext();) {
+ monitor.beginTask(Messages.TaiPanDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); //"Saving diagram"
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = (Resource) it.next();
monitor.setTaskName(NLS.bind(Messages.TaiPanDocumentProvider_SaveNextResourceTask, nextResource.getURI()));
if (nextResource.isLoaded() && !info.getEditingDomain().isReadOnly(nextResource)) {
@@ -746,6 +745,13 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
/**
* @generated
*/
+ public Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/getLoadedResourcesIterator() {
+ return new ArrayList/*<org.eclipse.emf.ecore.resource.Resource>*/(getResourceSet().getResources()).iterator();
+ }
+
+ /**
+ * @generated
+ */
public IEditorInput getEditorInput() {
return myEditorInput;
}
@@ -756,7 +762,7 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
public void dispose() {
stopResourceListening();
getResourceSet().eAdapters().remove(myResourceSetListener);
- for (Iterator it = getResourceSet().getResources().iterator(); it.hasNext();) {
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = getLoadedResourcesIterator(); it.hasNext();) {
Resource resource = (Resource) it.next();
resource.unload();
}
@@ -952,7 +958,7 @@ public class TaiPanDocumentProvider extends AbstractDocumentProvider implements
Resource resource = (Resource) notification.getNotifier();
if (resource.isLoaded()) {
boolean modified = false;
- for (Iterator it = myInfo.getResourceSet().getResources().iterator(); it.hasNext() && !modified;) {
+ for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
Resource nextResource = (Resource) it.next();
if (nextResource.isLoaded()) {
modified = nextResource.isModified();
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/properties/TaiPanPropertiesLabelProvider.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/properties/TaiPanPropertiesLabelProvider.java
index 7db4141aa..c037525a2 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/properties/TaiPanPropertiesLabelProvider.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/properties/TaiPanPropertiesLabelProvider.java
@@ -15,36 +15,36 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.examples.taipan.gmf.editor.part.TaiPanDiagramEditorPlugin;
+import org.eclipse.gmf.examples.taipan.gmf.editor.part.TaiPanVisualIDRegistry;
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.BaseLabelProvider;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.graphics.Image;
/**
* @generated
*/
-public class TaiPanPropertiesLabelProvider extends DecoratingLabelProvider {
-
- /**
- * @generated
- */
- public TaiPanPropertiesLabelProvider() {
- super(new AdapterFactoryLabelProvider(TaiPanDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory()), null);
- }
+public class TaiPanPropertiesLabelProvider extends BaseLabelProvider implements ILabelProvider {
/**
* @generated
*/
public String getText(Object element) {
- Object selected = unwrap(element);
- return super.getText(selected);
+ element = unwrap(element);
+ IElementType etype = getElementType(getView(element));
+ return etype == null ? "" : etype.getDisplayName();
}
/**
* @generated
*/
public Image getImage(Object element) {
- return super.getImage(unwrap(element));
+ IElementType etype = getElementType(getView(unwrap(element)));
+ return etype == null ? null : TaiPanElementTypes.getImage(etype);
}
/**
@@ -52,16 +52,7 @@ public class TaiPanPropertiesLabelProvider extends DecoratingLabelProvider {
*/
private Object unwrap(Object element) {
if (element instanceof IStructuredSelection) {
- return unwrap(((IStructuredSelection) element).getFirstElement());
- }
- if (element instanceof EditPart) {
- return unwrapEditPart((EditPart) element);
- }
- if (element instanceof IAdaptable) {
- View view = (View) ((IAdaptable) element).getAdapter(View.class);
- if (view != null) {
- return unwrapView(view);
- }
+ return ((IStructuredSelection) element).getFirstElement();
}
return element;
}
@@ -69,18 +60,30 @@ public class TaiPanPropertiesLabelProvider extends DecoratingLabelProvider {
/**
* @generated
*/
- private Object unwrapEditPart(EditPart p) {
- if (p.getModel() instanceof View) {
- return unwrapView((View) p.getModel());
+ private View getView(Object element) {
+ if (element instanceof View) {
+ return (View) element;
+ }
+ if (element instanceof IAdaptable) {
+ return (View) ((IAdaptable) element).getAdapter(View.class);
}
- return p.getModel();
+ return null;
}
/**
* @generated
*/
- private Object unwrapView(View view) {
- return view.getElement() == null ? view : view.getElement();
+ private IElementType getElementType(View view) {
+ // For intermediate views climb up the containment hierarchy to find the one associated with an element type.
+ while (view != null) {
+ int vid = TaiPanVisualIDRegistry.getVisualID(view);
+ IElementType etype = TaiPanElementTypes.getElementType(vid);
+ if (etype != null) {
+ return etype;
+ }
+ view = view.eContainer() instanceof View ? (View) view.eContainer() : null;
+ }
+ return null;
}
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/providers/ElementInitializers.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/providers/ElementInitializers.java
index 838898775..0ce8f84d8 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/providers/ElementInitializers.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/providers/ElementInitializers.java
@@ -36,10 +36,10 @@ public class ElementInitializers {
*/
public static void init_Route_4002(Route instance) {
try {
- Object value0 = TaiPanOCLFactory.getExpression("0.8", TaiPanPackage.eINSTANCE.getRoute()).evaluate(instance);
+ Object value_0 = TaiPanOCLFactory.getExpression("0.8", TaiPanPackage.eINSTANCE.getRoute()).evaluate(instance);
- value0 = TaiPanAbstractExpression.performCast(value0, EcorePackage.eINSTANCE.getEDouble());
- instance.setReliability(((Double) value0).doubleValue());
+ value_0 = TaiPanAbstractExpression.performCast(value_0, EcorePackage.eINSTANCE.getEDouble());
+ instance.setReliability(((Double) value_0).doubleValue());
} catch (RuntimeException e) {
TaiPanDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
}
@@ -50,10 +50,10 @@ public class ElementInitializers {
*/
public static void init_Route_4003(Route instance) {
try {
- Object value0 = TaiPanOCLFactory.getExpression("0.2", TaiPanPackage.eINSTANCE.getRoute()).evaluate(instance);
+ Object value_0 = TaiPanOCLFactory.getExpression("0.2", TaiPanPackage.eINSTANCE.getRoute()).evaluate(instance);
- value0 = TaiPanAbstractExpression.performCast(value0, EcorePackage.eINSTANCE.getEDouble());
- instance.setReliability(((Double) value0).doubleValue());
+ value_0 = TaiPanAbstractExpression.performCast(value_0, EcorePackage.eINSTANCE.getEDouble());
+ instance.setReliability(((Double) value_0).doubleValue());
} catch (RuntimeException e) {
TaiPanDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/providers/TaiPanElementTypes.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/providers/TaiPanElementTypes.java
index 0deec0adc..0e3824447 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/providers/TaiPanElementTypes.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/providers/TaiPanElementTypes.java
@@ -22,6 +22,20 @@ import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.examples.taipan.TaiPanPackage;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.AquatoryEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.BesiegePortOrderEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.EmptyBoxEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.EscortShipsOrderEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.LargeItemEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.PortEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.PortRegisterEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.ReliableRouteEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.ShipDestinationEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.ShipEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.ShipRouteEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.SmallItemsEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.UnreliableRouteEditPart;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.WarshipEditPart;
import org.eclipse.gmf.examples.taipan.gmf.editor.part.TaiPanDiagramEditorPlugin;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -293,4 +307,41 @@ public class TaiPanElementTypes extends ElementInitializers {
return KNOWN_ELEMENT_TYPES.contains(elementType);
}
+ /**
+ * @generated
+ */
+ public static IElementType getElementType(int visualID) {
+ switch (visualID) {
+ case AquatoryEditPart.VISUAL_ID:
+ return Aquatory_1000;
+ case PortEditPart.VISUAL_ID:
+ return Port_2001;
+ case ShipEditPart.VISUAL_ID:
+ return Ship_2002;
+ case WarshipEditPart.VISUAL_ID:
+ return Warship_2003;
+ case SmallItemsEditPart.VISUAL_ID:
+ return SmallItems_3001;
+ case LargeItemEditPart.VISUAL_ID:
+ return LargeItem_3002;
+ case EmptyBoxEditPart.VISUAL_ID:
+ return EmptyBox_3003;
+ case ShipDestinationEditPart.VISUAL_ID:
+ return ShipDestination_4001;
+ case ReliableRouteEditPart.VISUAL_ID:
+ return Route_4002;
+ case UnreliableRouteEditPart.VISUAL_ID:
+ return Route_4003;
+ case ShipRouteEditPart.VISUAL_ID:
+ return ShipRoute_4004;
+ case BesiegePortOrderEditPart.VISUAL_ID:
+ return BesiegePortOrder_4005;
+ case EscortShipsOrderEditPart.VISUAL_ID:
+ return EscortShipsOrder_4006;
+ case PortRegisterEditPart.VISUAL_ID:
+ return PortRegister_4007;
+ }
+ return null;
+ }
+
}

Back to the top