Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2007-04-18 09:37:36 -0400
committerdstadnik2007-04-18 09:37:36 -0400
commit68303e0f23b24be32950e583a8a0acc255e3da40 (patch)
treed551252574334dd9a95667d4c665fe99b6ce1850
parent1c4a8efe541ca8cc6b1f6e892de10e7b44e4ec43 (diff)
downloadorg.eclipse.gmf-tooling-68303e0f23b24be32950e583a8a0acc255e3da40.tar.gz
org.eclipse.gmf-tooling-68303e0f23b24be32950e583a8a0acc255e3da40.tar.xz
org.eclipse.gmf-tooling-68303e0f23b24be32950e583a8a0acc255e3da40.zip
regenerated
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java2
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryCanonicalEditPolicy.java23
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/AquatoryItemSemanticEditPolicy.java11
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/BesiegePortOrderItemSemanticEditPolicy.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxCanonicalEditPolicy.java47
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxGraphicalNodeEditPolicy.java18
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxItemSemanticEditPolicy.java2
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EscortShipsOrderItemSemanticEditPolicy.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemCanonicalEditPolicy.java47
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemGraphicalNodeEditPolicy.java18
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemItemSemanticEditPolicy.java2
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/OpenDiagramEditPolicy.java5
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortCanonicalEditPolicy.java47
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortGraphicalNodeEditPolicy.java65
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortItemSemanticEditPolicy.java16
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortRegisterItemSemanticEditPolicy.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ReliableRouteItemSemanticEditPolicy.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipCanonicalEditPolicy.java47
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipDestinationItemSemanticEditPolicy.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipGraphicalNodeEditPolicy.java18
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipItemSemanticEditPolicy.java16
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoCanonicalEditPolicy.java9
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipLargeCargoItemSemanticEditPolicy.java6
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoCanonicalEditPolicy.java9
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipSmallCargoItemSemanticEditPolicy.java6
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/SmallItemsItemSemanticEditPolicy.java2
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanBaseItemSemanticEditPolicy.java8
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanGraphicalNodeEditPolicy.java54
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanTextNonResizableEditPolicy.java2
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanTextSelectionEditPolicy.java2
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/UnreliableRouteItemSemanticEditPolicy.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/WarshipItemSemanticEditPolicy.java15
32 files changed, 169 insertions, 346 deletions
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java
index abb70052f..3512660e3 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java
@@ -31,6 +31,7 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.ResizableEditPolicy;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.PortGraphicalNodeEditPolicy;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.PortItemSemanticEditPolicy;
import org.eclipse.gmf.examples.taipan.gmf.editor.part.TaiPanVisualIDRegistry;
import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
@@ -78,6 +79,7 @@ public class PortEditPart extends AbstractBorderedShapeEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PortItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new PortGraphicalNodeEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
}
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 78a3491de..d0e5654e8 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -11,19 +11,24 @@
*/
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
+import java.util.List;
import java.util.Collection;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.emf.ecore.EObject;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
-import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.IAdaptable;
+
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
+
import org.eclipse.gef.EditPart;
+
import org.eclipse.gef.commands.Command;
+
import org.eclipse.gmf.examples.taipan.Aquatory;
import org.eclipse.gmf.examples.taipan.BesiegePortOrder;
import org.eclipse.gmf.examples.taipan.EscortShipsOrder;
@@ -32,6 +37,7 @@ import org.eclipse.gmf.examples.taipan.Route;
import org.eclipse.gmf.examples.taipan.Ship;
import org.eclipse.gmf.examples.taipan.TaiPanPackage;
import org.eclipse.gmf.examples.taipan.Warship;
+
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;
@@ -45,19 +51,28 @@ import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.ShipEditPart;
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.TaiPanVisualIDRegistry;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
+
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+
import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalConnectionEditPolicy;
+
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
/**
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 dcdd02566..7bb56babe 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -13,15 +13,18 @@ package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.examples.taipan.TaiPanPackage;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.commands.PortCreateCommand;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.commands.ShipCreateCommand;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.commands.WarshipCreateCommand;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand;
+
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
/**
* @generated
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 21d78ac70..6a9c5b3fd 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2007 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -26,4 +26,5 @@ public class BesiegePortOrderItemSemanticEditPolicy extends TaiPanBaseItemSemant
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/EmptyBoxCanonicalEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxCanonicalEditPolicy.java
deleted file mode 100644
index 6b164b850..000000000
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxCanonicalEditPolicy.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2006 Borland Software Corporation
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- */
-package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class EmptyBoxCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- protected List getSemanticChildrenList() {
- List result = new LinkedList();
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean shouldDeleteView(View view) {
- return view.isSetElement() && view.getElement() != null && view.getElement().eIsProxy();
- }
-
- /**
- * @generated
- */
- protected String getDefaultFactoryHint() {
- return null;
- }
-
-}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxGraphicalNodeEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxGraphicalNodeEditPolicy.java
deleted file mode 100644
index b33a82f1b..000000000
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/EmptyBoxGraphicalNodeEditPolicy.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (c) 2006 Borland Software Corporation
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- */
-package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
-
-/**
- * @generated
- */
-public class EmptyBoxGraphicalNodeEditPolicy extends TaiPanGraphicalNodeEditPolicy {
-}
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 640dee1c9..1592aec91 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
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 0c93d928c..6df6e0518 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2007 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -26,4 +26,5 @@ public class EscortShipsOrderItemSemanticEditPolicy extends TaiPanBaseItemSemant
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/LargeItemCanonicalEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemCanonicalEditPolicy.java
deleted file mode 100644
index 1d4f22c00..000000000
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemCanonicalEditPolicy.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2006 Borland Software Corporation
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- */
-package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class LargeItemCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- protected List getSemanticChildrenList() {
- List result = new LinkedList();
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean shouldDeleteView(View view) {
- return view.isSetElement() && view.getElement() != null && view.getElement().eIsProxy();
- }
-
- /**
- * @generated
- */
- protected String getDefaultFactoryHint() {
- return null;
- }
-
-}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemGraphicalNodeEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemGraphicalNodeEditPolicy.java
deleted file mode 100644
index 9b3cb16ad..000000000
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/LargeItemGraphicalNodeEditPolicy.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (c) 2006 Borland Software Corporation
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- */
-package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
-
-/**
- * @generated
- */
-public class LargeItemGraphicalNodeEditPolicy extends TaiPanGraphicalNodeEditPolicy {
-}
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 9610cce32..05c0efdef 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/OpenDiagramEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/OpenDiagramEditPolicy.java
index 2d0b3329c..80aa733d0 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/OpenDiagramEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/OpenDiagramEditPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2007 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -84,6 +84,8 @@ public class OpenDiagramEditPolicy extends OpenEditPolicy {
diagramFacet = annotation;
}
+ // FIXME canExecute if !(readOnly && getDiagramToOpen == null), i.e. open works on ro diagrams only when there's associated diagram already
+
/**
* @generated
*/
@@ -183,4 +185,5 @@ public class OpenDiagramEditPolicy extends OpenEditPolicy {
return "org.eclipse.gmf.examples.taipan.port.diagram.part.TaiPanDiagramEditorID";
}
}
+
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortCanonicalEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortCanonicalEditPolicy.java
deleted file mode 100644
index ce074652b..000000000
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortCanonicalEditPolicy.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2006 Borland Software Corporation
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- */
-package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class PortCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- protected List getSemanticChildrenList() {
- List result = new LinkedList();
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean shouldDeleteView(View view) {
- return view.isSetElement() && view.getElement() != null && view.getElement().eIsProxy();
- }
-
- /**
- * @generated
- */
- protected String getDefaultFactoryHint() {
- return null;
- }
-
-}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortGraphicalNodeEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortGraphicalNodeEditPolicy.java
index d7f78e084..b48e0b278 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortGraphicalNodeEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/PortGraphicalNodeEditPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -11,8 +11,69 @@
*/
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+import org.eclipse.gef.commands.Command;
+
+import org.eclipse.gef.requests.CreateConnectionRequest;
+
+import org.eclipse.gmf.examples.taipan.gmf.editor.edit.commands.TaiPanReorientConnectionViewCommand;
+
+import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
+
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
/**
* @generated
*/
-public class PortGraphicalNodeEditPolicy extends TaiPanGraphicalNodeEditPolicy {
+public class PortGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
+
+ /**
+ * @generated
+ */
+ protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
+ IElementType elementType = getElementType(request);
+ if (TaiPanElementTypes.PortRegister_4007 == elementType) {
+ if (request.getSourceEditPart() != getHost()) {
+ return getConnectionWithReorientedViewCompleteCommand(request);
+ }
+ }
+ return super.getConnectionCompleteCommand(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected IElementType getElementType(CreateConnectionRequest request) {
+ if (request instanceof CreateConnectionViewAndElementRequest) {
+ CreateElementRequestAdapter requestAdapter = ((CreateConnectionViewAndElementRequest) request).getConnectionViewAndElementDescriptor().getCreateElementRequestAdapter();
+ return (IElementType) requestAdapter.getAdapter(IElementType.class);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getConnectionWithReorientedViewCompleteCommand(CreateConnectionRequest request) {
+ ICommandProxy c = (ICommandProxy) super.getConnectionCompleteCommand(request);
+ CompositeCommand cc = (CompositeCommand) c.getICommand();
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ TaiPanReorientConnectionViewCommand rcvCommand = new TaiPanReorientConnectionViewCommand(editingDomain, null);
+ rcvCommand.setEdgeAdaptor(getViewAdapter());
+ cc.compose(rcvCommand);
+ return c;
+ }
}
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 bdedb38af..7d472f9e0 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -17,7 +17,6 @@ import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.examples.taipan.Aquatory;
import org.eclipse.gmf.examples.taipan.Port;
-import org.eclipse.gmf.examples.taipan.Ship;
import org.eclipse.gmf.examples.taipan.TaiPanPackage;
import org.eclipse.gmf.examples.taipan.Warship;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.commands.BesiegePortOrderCreateCommand;
@@ -37,12 +36,10 @@ import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.ShipDestinationEdit
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.UnreliableRouteEditPart;
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.commands.SetValueCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.gmf.runtime.notation.View;
/**
@@ -80,7 +77,7 @@ public class PortItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPolicy
return req.getTarget() == null ? null : getCreateCompleteIncomingBesiegePortOrder_4005Command(req);
}
if (TaiPanElementTypes.PortRegister_4007 == req.getElementType()) {
- return req.getTarget() == null ? getCreateStartOutgoingPortRegister_4007Command(req) : null;
+ return req.getTarget() == null ? getCreateStartOutgoingPortRegister_4007Command(req) : getCreateCompleteOutgoingPortRegister_4007Command(req);
}
return super.getCreateRelationshipCommand(req);
}
@@ -208,7 +205,14 @@ public class PortItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPolicy
}
/**
- * Returns command to reorient link. New link target or source
+ * @generated
+ */
+ protected Command getCreateCompleteOutgoingPortRegister_4007Command(CreateRelationshipRequest req) {
+ return getGEFWrapper(new PortRegisterCreateCommand(req));
+ }
+
+ /**
+ * Returns command to reorient EClass based link. New link target or source
* should be the domain model element associated with this node.
*
* @generated
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 03227fc1d..158344d6e 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2007 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -26,4 +26,5 @@ public class PortRegisterItemSemanticEditPolicy extends TaiPanBaseItemSemanticEd
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 7d639b9ac..bcbbf0977 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2007 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -26,4 +26,5 @@ public class ReliableRouteItemSemanticEditPolicy extends TaiPanBaseItemSemanticE
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/ShipCanonicalEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipCanonicalEditPolicy.java
deleted file mode 100644
index e186b49fb..000000000
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipCanonicalEditPolicy.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2006 Borland Software Corporation
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- */
-package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @generated
- */
-public class ShipCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- protected List getSemanticChildrenList() {
- List result = new LinkedList();
- return result;
- }
-
- /**
- * @generated
- */
- protected boolean shouldDeleteView(View view) {
- return view.isSetElement() && view.getElement() != null && view.getElement().eIsProxy();
- }
-
- /**
- * @generated
- */
- protected String getDefaultFactoryHint() {
- return null;
- }
-
-}
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 92c6283be..59bca04f3 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -26,4 +26,5 @@ public class ShipDestinationItemSemanticEditPolicy extends TaiPanBaseItemSemanti
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/ShipGraphicalNodeEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipGraphicalNodeEditPolicy.java
deleted file mode 100644
index 2d462a2e9..000000000
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/ShipGraphicalNodeEditPolicy.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (c) 2006 Borland Software Corporation
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- */
-package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
-
-/**
- * @generated
- */
-public class ShipGraphicalNodeEditPolicy extends TaiPanGraphicalNodeEditPolicy {
-}
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 84c9a5cb6..442a5ac80 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -18,7 +18,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.examples.taipan.Port;
import org.eclipse.gmf.examples.taipan.Ship;
import org.eclipse.gmf.examples.taipan.TaiPanPackage;
import org.eclipse.gmf.examples.taipan.Warship;
@@ -39,12 +38,10 @@ import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.SmallItemsEditPart;
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.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
@@ -117,7 +114,7 @@ public class ShipItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPolicy
return req.getTarget() == null ? null : getCreateCompleteIncomingEscortShipsOrder_4006Command(req);
}
if (TaiPanElementTypes.PortRegister_4007 == req.getElementType()) {
- return req.getTarget() == null ? null : getCreateCompleteIncomingPortRegister_4007Command(req);
+ return req.getTarget() == null ? getCreateStartIncomingPortRegister_4007Command(req) : getCreateCompleteIncomingPortRegister_4007Command(req);
}
return super.getCreateRelationshipCommand(req);
}
@@ -152,12 +149,19 @@ public class ShipItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPolicy
/**
* @generated
*/
+ protected Command getCreateStartIncomingPortRegister_4007Command(CreateRelationshipRequest req) {
+ return getGEFWrapper(new PortRegisterCreateCommand(req));
+ }
+
+ /**
+ * @generated
+ */
protected Command getCreateCompleteIncomingPortRegister_4007Command(CreateRelationshipRequest req) {
return getGEFWrapper(new PortRegisterCreateCommand(req));
}
/**
- * Returns command to reorient link. New link target or source
+ * Returns command to reorient EClass based link. New link target or source
* should be the domain model element associated with this node.
*
* @generated
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 298defd20..2811bf2de 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -11,17 +11,20 @@
*/
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
+
import org.eclipse.gmf.examples.taipan.Ship;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.EmptyBoxEditPart;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.LargeItemEditPart;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.part.TaiPanVisualIDRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
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 d6386a240..66bcad588 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -12,10 +12,14 @@
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.gef.commands.Command;
+
import org.eclipse.gmf.examples.taipan.TaiPanPackage;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.commands.EmptyBoxCreateCommand;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.commands.LargeItemCreateCommand;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
+
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
/**
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 5aa48a4e6..927e88fe6 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -11,16 +11,19 @@
*/
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
+
import org.eclipse.gmf.examples.taipan.Ship;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.SmallItemsEditPart;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.part.TaiPanVisualIDRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
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 043f5a8af..f4b25fb07 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -12,9 +12,13 @@
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
import org.eclipse.gef.commands.Command;
+
import org.eclipse.gmf.examples.taipan.TaiPanPackage;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.commands.SmallItemsCreateCommand;
+
import org.eclipse.gmf.examples.taipan.gmf.editor.providers.TaiPanElementTypes;
+
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
/**
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 d87544bb5..2ff3d52c9 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
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 d066e596d..f42fcc031 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -268,6 +268,7 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
}
/**
+ * @deprecated use getGEFWrapper() instead
* @generated
*/
protected final Command getMSLWrapper(ICommand cmd) {
@@ -340,12 +341,12 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
}
/**
- * @generated
+ * @generated
*/
public static class LinkConstraints {
/**
- * @generated
+ * @generated
*/
private static final String OPPOSITE_END_VAR = "oppositeEnd"; //$NON-NLS-1$
@@ -517,6 +518,7 @@ public class TaiPanBaseItemSemanticEditPolicy extends SemanticEditPolicy {
return false;
}
}
+
}
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanGraphicalNodeEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanGraphicalNodeEditPolicy.java
deleted file mode 100644
index aff8f83f1..000000000
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanGraphicalNodeEditPolicy.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2006 Borland Software Corporation
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- */
-package org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies;
-
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.CreateConnectionRequest;
-import org.eclipse.gmf.examples.taipan.gmf.editor.edit.commands.TaiPanReorientConnectionViewCommand;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-
-/**
- * @generated
- */
-public class TaiPanGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
-
- /**
- * @generated
- */
- protected IElementType getElementType(CreateConnectionRequest request) {
- if (request instanceof CreateConnectionViewAndElementRequest) {
- CreateElementRequestAdapter requestAdapter = ((CreateConnectionViewAndElementRequest) request).getConnectionViewAndElementDescriptor().getCreateElementRequestAdapter();
- return (IElementType) requestAdapter.getAdapter(IElementType.class);
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getConnectionWithReorientedViewCompleteCommand(CreateConnectionRequest request) {
- ICommandProxy c = (ICommandProxy) super.getConnectionCompleteCommand(request);
- CompositeCommand cc = (CompositeCommand) c.getICommand();
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
- TaiPanReorientConnectionViewCommand rcvCommand = new TaiPanReorientConnectionViewCommand(editingDomain, null);
- rcvCommand.setEdgeAdaptor(getViewAdapter());
- cc.compose(rcvCommand);
- return c;
- }
-}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanTextNonResizableEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanTextNonResizableEditPolicy.java
index fae0b25e3..aa0773447 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanTextNonResizableEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanTextNonResizableEditPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanTextSelectionEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanTextSelectionEditPolicy.java
index 776dc16d8..6f6a61d40 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanTextSelectionEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanTextSelectionEditPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
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 94b1f53eb..1b0802ad0 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2007 Borland Software Corporation
+ * Copyright (c) 2006, 2007 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -26,4 +26,5 @@ public class UnreliableRouteItemSemanticEditPolicy extends TaiPanBaseItemSemanti
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 c9d75a3c4..b70edc433 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
@@ -15,7 +15,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.examples.taipan.Port;
import org.eclipse.gmf.examples.taipan.Ship;
import org.eclipse.gmf.examples.taipan.TaiPanPackage;
import org.eclipse.gmf.examples.taipan.Warship;
@@ -32,12 +31,10 @@ import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.PortRegisterEditPar
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts.ShipDestinationEditPart;
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.commands.SetValueCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.gmf.runtime.notation.View;
/**
@@ -72,7 +69,7 @@ public class WarshipItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPol
return req.getTarget() == null ? getCreateStartOutgoingBesiegePortOrder_4005Command(req) : null;
}
if (TaiPanElementTypes.PortRegister_4007 == req.getElementType()) {
- return req.getTarget() == null ? null : getCreateCompleteIncomingPortRegister_4007Command(req);
+ return req.getTarget() == null ? getCreateStartIncomingPortRegister_4007Command(req) : getCreateCompleteIncomingPortRegister_4007Command(req);
}
return super.getCreateRelationshipCommand(req);
}
@@ -139,12 +136,19 @@ public class WarshipItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPol
/**
* @generated
*/
+ protected Command getCreateStartIncomingPortRegister_4007Command(CreateRelationshipRequest req) {
+ return getGEFWrapper(new PortRegisterCreateCommand(req));
+ }
+
+ /**
+ * @generated
+ */
protected Command getCreateCompleteIncomingPortRegister_4007Command(CreateRelationshipRequest req) {
return getGEFWrapper(new PortRegisterCreateCommand(req));
}
/**
- * Returns command to reorient link. New link target or source
+ * Returns command to reorient EClass based link. New link target or source
* should be the domain model element associated with this node.
*
* @generated
@@ -174,4 +178,5 @@ public class WarshipItemSemanticEditPolicy extends TaiPanBaseItemSemanticEditPol
}
return super.getReorientReferenceRelationshipCommand(req);
}
+
}

Back to the top