Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2006-06-23 12:25:42 -0400
committerdstadnik2006-06-23 12:25:42 -0400
commit5f72177f7d4538e2a3ca8385bde0aa6b800085a2 (patch)
tree43c64cd8d96bfaa25bc5625955d5bc8de19635d0 /examples
parent4ea6c6b2745a0d7de7bcf8e00a3086865c95f401 (diff)
downloadorg.eclipse.gmf-tooling-5f72177f7d4538e2a3ca8385bde0aa6b800085a2.tar.gz
org.eclipse.gmf-tooling-5f72177f7d4538e2a3ca8385bde0aa6b800085a2.tar.xz
org.eclipse.gmf-tooling-5f72177f7d4538e2a3ca8385bde0aa6b800085a2.zip
regenerate
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EmptyBoxEditPart.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/LargeItemEditPart.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java16
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipEditPart.java3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanExtNodeLabelHostLayoutEditPolicy.java16
5 files changed, 34 insertions, 7 deletions
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EmptyBoxEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EmptyBoxEditPart.java
index dc3ce93c8..46f250912 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EmptyBoxEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EmptyBoxEditPart.java
@@ -90,7 +90,7 @@ public class EmptyBoxEditPart extends ShapeNodeEditPart {
* @generated
*/
protected LayoutEditPolicy createLayoutEditPolicy() {
- return new LayoutEditPolicy() {
+ LayoutEditPolicy lep = new LayoutEditPolicy() {
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
@@ -108,6 +108,7 @@ public class EmptyBoxEditPart extends ShapeNodeEditPart {
return null;
}
};
+ return lep;
}
/**
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/LargeItemEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/LargeItemEditPart.java
index 47ec8f3c3..83f1576ae 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/LargeItemEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/LargeItemEditPart.java
@@ -84,7 +84,7 @@ public class LargeItemEditPart extends ShapeNodeEditPart {
* @generated
*/
protected LayoutEditPolicy createLayoutEditPolicy() {
- return new LayoutEditPolicy() {
+ LayoutEditPolicy lep = new LayoutEditPolicy() {
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
@@ -102,6 +102,7 @@ public class LargeItemEditPart extends ShapeNodeEditPart {
return null;
}
};
+ return lep;
}
/**
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 5ce7e66d2..6e79adfd8 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
@@ -11,6 +11,8 @@
*/
package org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts;
+import java.util.Iterator;
+
import org.eclipse.draw2d.FreeformLayout;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
@@ -249,6 +251,20 @@ public class PortEditPart extends ShapeNodeEditPart {
/**
* @generated
*/
+ public void removeNotify() {
+ for (Iterator it = getChildren().iterator(); it.hasNext();) {
+ EditPart childEditPart = (EditPart) it.next();
+ if (isExternalLabel(childEditPart)) {
+ IFigure labelFigure = ((GraphicalEditPart) childEditPart).getFigure();
+ getExternalLabelsContainer().remove(labelFigure);
+ }
+ }
+ super.removeNotify();
+ }
+
+ /**
+ * @generated
+ */
public class PortFigure extends org.eclipse.draw2d.Layer {
/**
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipEditPart.java
index 54715e607..a22fc850a 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipEditPart.java
@@ -110,7 +110,7 @@ public class ShipEditPart extends ShapeNodeEditPart {
* @generated
*/
protected LayoutEditPolicy createLayoutEditPolicy() {
- return new LayoutEditPolicy() {
+ LayoutEditPolicy lep = new LayoutEditPolicy() {
protected EditPolicy createChildEditPolicy(EditPart child) {
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
@@ -128,6 +128,7 @@ public class ShipEditPart extends ShapeNodeEditPart {
return null;
}
};
+ return lep;
}
/**
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanExtNodeLabelHostLayoutEditPolicy.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanExtNodeLabelHostLayoutEditPolicy.java
index cac573583..5e739654a 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanExtNodeLabelHostLayoutEditPolicy.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/policies/TaiPanExtNodeLabelHostLayoutEditPolicy.java
@@ -64,10 +64,12 @@ public class TaiPanExtNodeLabelHostLayoutEditPolicy extends XYLayoutEditPolicy {
*/
protected final List getExternalLabels(GroupRequest request) {
List editParts = new ArrayList();
- for (Iterator it = request.getEditParts().iterator(); it.hasNext();) {
- EditPart editPart = (EditPart) it.next();
- if (isExternalLabel(editPart)) {
- editParts.add(editPart);
+ if (request.getEditParts() != null) {
+ for (Iterator it = request.getEditParts().iterator(); it.hasNext();) {
+ EditPart editPart = (EditPart) it.next();
+ if (isExternalLabel(editPart)) {
+ editParts.add(editPart);
+ }
}
}
return editParts;
@@ -95,6 +97,12 @@ public class TaiPanExtNodeLabelHostLayoutEditPolicy extends XYLayoutEditPolicy {
return cmd == null ? extLabelsCmd : cmd.chain(extLabelsCmd);
}
}
+ if (request instanceof GroupRequest) {
+ List extLabels = getExternalLabels((GroupRequest) request);
+ if (!extLabels.isEmpty()) {
+ return null;
+ }
+ }
return realLayoutEditPolicy == null ? null : realLayoutEditPolicy.getCommand(request);
}

Back to the top