Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormgolubev2012-05-01 02:11:45 +0000
committermgolubev2012-05-01 02:11:45 +0000
commit7caf594835abb720099695c8b721b767624cc416 (patch)
treee949704a8f57ba07dec8310c558a522e3d94b99f
parentcf14def2d6eea35c5abdafdb82930eebbaa2cb62 (diff)
downloadorg.eclipse.gmf-tooling-7caf594835abb720099695c8b721b767624cc416.tar.gz
org.eclipse.gmf-tooling-7caf594835abb720099695c8b721b767624cc416.tar.xz
org.eclipse.gmf-tooling-7caf594835abb720099695c8b721b767624cc416.zip
[374609] - sample diagram merged after merging the templates with
[372479]
-rw-r--r--examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOEDiagramUpdater.java39
-rw-r--r--examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOELinkDescriptor.java74
-rw-r--r--examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOENodeDescriptor.java30
3 files changed, 46 insertions, 97 deletions
diff --git a/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOEDiagramUpdater.java b/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOEDiagramUpdater.java
index 8269e4bcd..683a242a0 100644
--- a/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOEDiagramUpdater.java
+++ b/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOEDiagramUpdater.java
@@ -32,6 +32,7 @@ import org.eclipse.gmf.examples.ocldriven.toe.diagram.edit.parts.ManagerManagedD
import org.eclipse.gmf.examples.ocldriven.toe.diagram.edit.parts.ProjectEditPart;
import org.eclipse.gmf.examples.ocldriven.toe.diagram.providers.TOEElementTypes;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
/**
* @generated
@@ -536,4 +537,42 @@ public class TOEDiagramUpdater {
return result;
}
+ /**
+ * @generated
+ */
+ public static final DiagramUpdater TYPED_INSTANCE = new DiagramUpdater() {
+
+ /**
+ * @generated
+ */
+ @Override
+ public List<TOENodeDescriptor> getSemanticChildren(View view) {
+ return TOEDiagramUpdater.getSemanticChildren(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public List<TOELinkDescriptor> getContainedLinks(View view) {
+ return TOEDiagramUpdater.getContainedLinks(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public List<TOELinkDescriptor> getIncomingLinks(View view) {
+ return TOEDiagramUpdater.getIncomingLinks(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public List<TOELinkDescriptor> getOutgoingLinks(View view) {
+ return TOEDiagramUpdater.getOutgoingLinks(view);
+ }
+ };
+
}
diff --git a/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOELinkDescriptor.java b/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOELinkDescriptor.java
index 3fde9af82..3cba10916 100644
--- a/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOELinkDescriptor.java
+++ b/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOELinkDescriptor.java
@@ -1,92 +1,26 @@
package org.eclipse.gmf.examples.ocldriven.toe.diagram.part;
-import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.tooling.runtime.update.UpdaterLinkDescriptor;
/**
* @generated
*/
-public class TOELinkDescriptor extends TOENodeDescriptor {
-
- /**
- * @generated
- */
- private EObject mySource;
-
- /**
- * @generated
- */
- private EObject myDestination;
-
- /**
- * @generated
- */
- private IAdaptable mySemanticAdapter;
-
- /**
- * @generated
- */
- private TOELinkDescriptor(EObject source, EObject destination, EObject linkElement, int linkVID) {
- super(linkElement, linkVID);
- mySource = source;
- myDestination = destination;
- }
+public class TOELinkDescriptor extends UpdaterLinkDescriptor {
/**
* @generated
*/
public TOELinkDescriptor(EObject source, EObject destination, IElementType elementType, int linkVID) {
- this(source, destination, (EObject) null, linkVID);
- final IElementType elementTypeCopy = elementType;
- mySemanticAdapter = new IAdaptable() {
-
- public Object getAdapter(Class adapter) {
- if (IElementType.class.equals(adapter)) {
- return elementTypeCopy;
- }
- return null;
- }
- };
+ super(source, destination, elementType, linkVID);
}
/**
* @generated
*/
public TOELinkDescriptor(EObject source, EObject destination, EObject linkElement, IElementType elementType, int linkVID) {
- this(source, destination, linkElement, linkVID);
- final IElementType elementTypeCopy = elementType;
- mySemanticAdapter = new EObjectAdapter(linkElement) {
-
- public Object getAdapter(Class adapter) {
- if (IElementType.class.equals(adapter)) {
- return elementTypeCopy;
- }
- return super.getAdapter(adapter);
- }
- };
- }
-
- /**
- * @generated
- */
- public EObject getSource() {
- return mySource;
- }
-
- /**
- * @generated
- */
- public EObject getDestination() {
- return myDestination;
- }
-
- /**
- * @generated
- */
- public IAdaptable getSemanticAdapter() {
- return mySemanticAdapter;
+ super(source, destination, linkElement, elementType, linkVID);
}
}
diff --git a/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOENodeDescriptor.java b/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOENodeDescriptor.java
index 36adab97c..17d256fed 100644
--- a/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOENodeDescriptor.java
+++ b/examples/org.eclipse.gmf.examples.ocldriven.diagram/src/org/eclipse/gmf/examples/ocldriven/toe/diagram/part/TOENodeDescriptor.java
@@ -1,42 +1,18 @@
package org.eclipse.gmf.examples.ocldriven.toe.diagram.part;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.tooling.runtime.update.UpdaterNodeDescriptor;
/**
* @generated
*/
-public class TOENodeDescriptor {
-
- /**
- * @generated
- */
- private final EObject myModelElement;
-
- /**
- * @generated
- */
- private final int myVisualID;
+public class TOENodeDescriptor extends UpdaterNodeDescriptor {
/**
* @generated
*/
public TOENodeDescriptor(EObject modelElement, int visualID) {
- myModelElement = modelElement;
- myVisualID = visualID;
- }
-
- /**
- * @generated
- */
- public EObject getModelElement() {
- return myModelElement;
- }
-
- /**
- * @generated
- */
- public int getVisualID() {
- return myVisualID;
+ super(modelElement, visualID);
}
}

Back to the top