Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2009-02-23 17:07:05 +0000
committeratikhomirov2009-02-23 17:07:05 +0000
commit54ebee41076291d540cb016ed6874c45afeb2e90 (patch)
treede9e30a46d7b9fdba457c9c3494dad901c46a3bc /examples
parent1066fd7a4c6e298583b4dd1bcfd0560389d17231 (diff)
downloadorg.eclipse.gmf-tooling-54ebee41076291d540cb016ed6874c45afeb2e90.tar.gz
org.eclipse.gmf-tooling-54ebee41076291d540cb016ed6874c45afeb2e90.tar.xz
org.eclipse.gmf-tooling-54ebee41076291d540cb016ed6874c45afeb2e90.zip
regenerated with recent gmfgen/templates changes
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAnnotation2ItemSemanticEditPolicy.java12
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAnnotationItemSemanticEditPolicy.java26
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAttributeItemSemanticEditPolicy.java12
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EClass2ItemSemanticEditPolicy.java12
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EClassItemSemanticEditPolicy.java46
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EDataType2ItemSemanticEditPolicy.java12
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EDataTypeItemSemanticEditPolicy.java30
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnum2ItemSemanticEditPolicy.java12
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnumItemSemanticEditPolicy.java30
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnumLiteralItemSemanticEditPolicy.java12
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EOperationItemSemanticEditPolicy.java12
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EPackage2ItemSemanticEditPolicy.java22
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EPackage3ItemSemanticEditPolicy.java12
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EStringToStringMapEntryItemSemanticEditPolicy.java12
14 files changed, 131 insertions, 131 deletions
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAnnotation2ItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAnnotation2ItemSemanticEditPolicy.java
index 477d62cc4..2c82e2582 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAnnotation2ItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAnnotation2ItemSemanticEditPolicy.java
@@ -37,18 +37,18 @@ public class EAnnotation2ItemSemanticEditPolicy extends EcoreBaseItemSemanticEdi
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cc, view);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAnnotationItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAnnotationItemSemanticEditPolicy.java
index 978f32d4e..377ce6993 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAnnotationItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAnnotationItemSemanticEditPolicy.java
@@ -52,14 +52,14 @@ public class EAnnotationItemSemanticEditPolicy extends EcoreBaseItemSemanticEdit
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
for (Iterator it = view.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge) it.next();
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EAnnotationReferencesEditPart.VISUAL_ID) {
DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cc.add(new DestroyReferenceCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
}
@@ -67,22 +67,22 @@ public class EAnnotationItemSemanticEditPolicy extends EcoreBaseItemSemanticEdit
Edge outgoingLink = (Edge) it.next();
if (EcoreVisualIDRegistry.getVisualID(outgoingLink) == EAnnotationReferencesEditPart.VISUAL_ID) {
DestroyReferenceRequest r = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
- cc.add(new DestroyReferenceCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
continue;
}
}
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyChildNodesCommand(cc);
- addDestroyShortcutsCommand(cc, view);
+ addDestroyChildNodesCommand(cmd);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
/**
@@ -90,8 +90,8 @@ public class EAnnotationItemSemanticEditPolicy extends EcoreBaseItemSemanticEdit
*/
private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
View view = (View) getHost().getModel();
- for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
- Node node = (Node) it.next();
+ for (Iterator nit = view.getChildren().iterator(); nit.hasNext();) {
+ Node node = (Node) nit.next();
switch (EcoreVisualIDRegistry.getVisualID(node)) {
case EAnnotationDetailsEditPart.VISUAL_ID:
for (Iterator cit = node.getChildren().iterator(); cit.hasNext();) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAttributeItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAttributeItemSemanticEditPolicy.java
index fc543e7f7..de7a97ee8 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAttributeItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EAttributeItemSemanticEditPolicy.java
@@ -37,18 +37,18 @@ public class EAttributeItemSemanticEditPolicy extends EcoreBaseItemSemanticEditP
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cc, view);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EClass2ItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EClass2ItemSemanticEditPolicy.java
index 1a20e4668..9d06c5678 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EClass2ItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EClass2ItemSemanticEditPolicy.java
@@ -37,18 +37,18 @@ public class EClass2ItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPoli
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cc, view);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EClassItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EClassItemSemanticEditPolicy.java
index 21f215f2a..69efe44ce 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EClassItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EClassItemSemanticEditPolicy.java
@@ -66,32 +66,32 @@ public class EClassItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPolic
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
for (Iterator it = view.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge) it.next();
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EAnnotationReferencesEditPart.VISUAL_ID) {
DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cc.add(new DestroyReferenceCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EReferenceEditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(incomingLink.getElement(), false);
- cc.add(new DestroyElementCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyElementCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EReference2EditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(incomingLink.getElement(), false);
- cc.add(new DestroyElementCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyElementCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EClassESuperTypesEditPart.VISUAL_ID) {
DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cc.add(new DestroyReferenceCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
}
@@ -99,34 +99,34 @@ public class EClassItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPolic
Edge outgoingLink = (Edge) it.next();
if (EcoreVisualIDRegistry.getVisualID(outgoingLink) == EReferenceEditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(outgoingLink.getElement(), false);
- cc.add(new DestroyElementCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new DestroyElementCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
continue;
}
if (EcoreVisualIDRegistry.getVisualID(outgoingLink) == EReference2EditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(outgoingLink.getElement(), false);
- cc.add(new DestroyElementCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new DestroyElementCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
continue;
}
if (EcoreVisualIDRegistry.getVisualID(outgoingLink) == EClassESuperTypesEditPart.VISUAL_ID) {
DestroyReferenceRequest r = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
- cc.add(new DestroyReferenceCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), outgoingLink));
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
continue;
}
}
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyChildNodesCommand(cc);
- addDestroyShortcutsCommand(cc, view);
+ addDestroyChildNodesCommand(cmd);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
/**
@@ -134,8 +134,8 @@ public class EClassItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPolic
*/
private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
View view = (View) getHost().getModel();
- for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
- Node node = (Node) it.next();
+ for (Iterator nit = view.getChildren().iterator(); nit.hasNext();) {
+ Node node = (Node) nit.next();
switch (EcoreVisualIDRegistry.getVisualID(node)) {
case EClassAttributesEditPart.VISUAL_ID:
for (Iterator cit = node.getChildren().iterator(); cit.hasNext();) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EDataType2ItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EDataType2ItemSemanticEditPolicy.java
index d3339be97..673c10935 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EDataType2ItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EDataType2ItemSemanticEditPolicy.java
@@ -37,18 +37,18 @@ public class EDataType2ItemSemanticEditPolicy extends EcoreBaseItemSemanticEditP
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cc, view);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EDataTypeItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EDataTypeItemSemanticEditPolicy.java
index 0eec31592..f08ae83f0 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EDataTypeItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EDataTypeItemSemanticEditPolicy.java
@@ -59,40 +59,40 @@ public class EDataTypeItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPo
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
for (Iterator it = view.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge) it.next();
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EAnnotationReferencesEditPart.VISUAL_ID) {
DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cc.add(new DestroyReferenceCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EReferenceEditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(incomingLink.getElement(), false);
- cc.add(new DestroyElementCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyElementCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EReference2EditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(incomingLink.getElement(), false);
- cc.add(new DestroyElementCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyElementCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
}
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyChildNodesCommand(cc);
- addDestroyShortcutsCommand(cc, view);
+ addDestroyChildNodesCommand(cmd);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
/**
@@ -100,8 +100,8 @@ public class EDataTypeItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPo
*/
private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
View view = (View) getHost().getModel();
- for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
- Node node = (Node) it.next();
+ for (Iterator nit = view.getChildren().iterator(); nit.hasNext();) {
+ Node node = (Node) nit.next();
switch (EcoreVisualIDRegistry.getVisualID(node)) {
case EDataTypeDataTypeAnnotationsEditPart.VISUAL_ID:
for (Iterator cit = node.getChildren().iterator(); cit.hasNext();) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnum2ItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnum2ItemSemanticEditPolicy.java
index 1f1ff3e9b..0eddf9be0 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnum2ItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnum2ItemSemanticEditPolicy.java
@@ -37,18 +37,18 @@ public class EEnum2ItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPolic
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cc, view);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnumItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnumItemSemanticEditPolicy.java
index ddf9003e7..3b88306aa 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnumItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnumItemSemanticEditPolicy.java
@@ -61,40 +61,40 @@ public class EEnumItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPolicy
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
for (Iterator it = view.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge) it.next();
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EAnnotationReferencesEditPart.VISUAL_ID) {
DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cc.add(new DestroyReferenceCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EReferenceEditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(incomingLink.getElement(), false);
- cc.add(new DestroyElementCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyElementCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EReference2EditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(incomingLink.getElement(), false);
- cc.add(new DestroyElementCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyElementCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
}
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyChildNodesCommand(cc);
- addDestroyShortcutsCommand(cc, view);
+ addDestroyChildNodesCommand(cmd);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
/**
@@ -102,8 +102,8 @@ public class EEnumItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPolicy
*/
private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
View view = (View) getHost().getModel();
- for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
- Node node = (Node) it.next();
+ for (Iterator nit = view.getChildren().iterator(); nit.hasNext();) {
+ Node node = (Node) nit.next();
switch (EcoreVisualIDRegistry.getVisualID(node)) {
case EEnumLiteralsEditPart.VISUAL_ID:
for (Iterator cit = node.getChildren().iterator(); cit.hasNext();) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnumLiteralItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnumLiteralItemSemanticEditPolicy.java
index b33e0db6a..b1899d389 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnumLiteralItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EEnumLiteralItemSemanticEditPolicy.java
@@ -37,18 +37,18 @@ public class EEnumLiteralItemSemanticEditPolicy extends EcoreBaseItemSemanticEdi
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cc, view);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EOperationItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EOperationItemSemanticEditPolicy.java
index 81798a3cb..1fed610e5 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EOperationItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EOperationItemSemanticEditPolicy.java
@@ -37,18 +37,18 @@ public class EOperationItemSemanticEditPolicy extends EcoreBaseItemSemanticEditP
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cc, view);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EPackage2ItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EPackage2ItemSemanticEditPolicy.java
index c95f938f9..a975a9b6c 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EPackage2ItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EPackage2ItemSemanticEditPolicy.java
@@ -60,28 +60,28 @@ public class EPackage2ItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPo
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
for (Iterator it = view.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge) it.next();
if (EcoreVisualIDRegistry.getVisualID(incomingLink) == EAnnotationReferencesEditPart.VISUAL_ID) {
DestroyReferenceRequest r = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cc.add(new DestroyReferenceCommand(r));
- cc.add(new DeleteCommand(getEditingDomain(), incomingLink));
+ cmd.add(new DestroyReferenceCommand(r));
+ cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
}
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyChildNodesCommand(cc);
- addDestroyShortcutsCommand(cc, view);
+ addDestroyChildNodesCommand(cmd);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
/**
@@ -89,8 +89,8 @@ public class EPackage2ItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPo
*/
private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
View view = (View) getHost().getModel();
- for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
- Node node = (Node) it.next();
+ for (Iterator nit = view.getChildren().iterator(); nit.hasNext();) {
+ Node node = (Node) nit.next();
switch (EcoreVisualIDRegistry.getVisualID(node)) {
case EPackageClassesEditPart.VISUAL_ID:
for (Iterator cit = node.getChildren().iterator(); cit.hasNext();) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EPackage3ItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EPackage3ItemSemanticEditPolicy.java
index 24c47c1cb..f30f1b7b0 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EPackage3ItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EPackage3ItemSemanticEditPolicy.java
@@ -37,18 +37,18 @@ public class EPackage3ItemSemanticEditPolicy extends EcoreBaseItemSemanticEditPo
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cc, view);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EStringToStringMapEntryItemSemanticEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EStringToStringMapEntryItemSemanticEditPolicy.java
index c0a5e0cae..d72d4e8e0 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EStringToStringMapEntryItemSemanticEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/EStringToStringMapEntryItemSemanticEditPolicy.java
@@ -37,18 +37,18 @@ public class EStringToStringMapEntryItemSemanticEditPolicy extends EcoreBaseItem
*/
protected Command getDestroyElementCommand(DestroyElementRequest req) {
View view = (View) getHost().getModel();
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(getEditingDomain(), null);
- cc.setTransactionNestingEnabled(false);
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(false);
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cc, view);
+ addDestroyShortcutsCommand(cmd, view);
// delete host element
- cc.add(new DestroyElementCommand(req));
+ cmd.add(new DestroyElementCommand(req));
} else {
- cc.add(new DeleteCommand(getEditingDomain(), view));
+ cmd.add(new DeleteCommand(getEditingDomain(), view));
}
- return getGEFWrapper(cc.reduce());
+ return getGEFWrapper(cmd.reduce());
}
}

Back to the top