Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2006-04-12 17:03:48 +0000
committerdstadnik2006-04-12 17:03:48 +0000
commit3785930ef4b3b978b2372c2034582a379f957c87 (patch)
tree39bdc885d0f1f5c838cd385600442e96661e1ff8
parentfd7d85469f71a3d17c736c7855fe732b16fa738b (diff)
downloadorg.eclipse.gmf-tooling-3785930ef4b3b978b2372c2034582a379f957c87.tar.gz
org.eclipse.gmf-tooling-3785930ef4b3b978b2372c2034582a379f957c87.tar.xz
org.eclipse.gmf-tooling-3785930ef4b3b978b2372c2034582a379f957c87.zip
regenerate to use new text direct edit manager
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/plugin.xml18
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotation2EditPart.java2
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotationEditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotation_source2EditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAttributeEditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClass2EditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClassEditPart.java2
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClass_nameEditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataType2EditPart.java2
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataTypeEditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataType_name2EditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnum2EditPart.java2
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnumEditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnumLiteralEditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnum_name2EditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EOperationEditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage2EditPart.java2
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage3EditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage_name2EditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EReference_name2EditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EReference_nameEditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EStringToStringMapEntryEditPart.java15
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/ITextAwareEditPart.java37
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/TextDirectEditManager.java383
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/LabelDirectEditPolicy.java2
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/providers/EcoreEditPartProvider.java3
26 files changed, 250 insertions, 443 deletions
diff --git a/examples/org.eclipse.gmf.ecore.editor/plugin.xml b/examples/org.eclipse.gmf.ecore.editor/plugin.xml
index 7dc2e1b30..19eb28d53 100644
--- a/examples/org.eclipse.gmf.ecore.editor/plugin.xml
+++ b/examples/org.eclipse.gmf.ecore.editor/plugin.xml
@@ -197,6 +197,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<metamodelType
id="org.eclipse.gmf.ecore.editor.EAttribute_2001"
+ name="EAttribute"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="EAttribute"
edithelper="org.eclipse.gmf.ecore.edit.helpers.EAttribute_2001EditHelper">
@@ -207,6 +208,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<metamodelType
id="org.eclipse.gmf.ecore.editor.EOperation_2002"
+ name="EOperation"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="EOperation"
edithelper="org.eclipse.gmf.ecore.edit.helpers.EOperation_2002EditHelper">
@@ -217,6 +219,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<metamodelType
id="org.eclipse.gmf.ecore.editor.EAnnotation_2003"
+ name="EAnnotation"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="EAnnotation"
edithelper="org.eclipse.gmf.ecore.edit.helpers.EAnnotation_2003EditHelper">
@@ -227,6 +230,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<specializationType
id="org.eclipse.gmf.ecore.editor.EClass_2004"
+ name="EClass"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice="org.eclipse.gmf.ecore.edit.helpers.EClass_2004EditHelperAdvice">
<specializes id="org.eclipse.gmf.ecore.editor.EClass_1001"/>
@@ -237,6 +241,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<specializationType
id="org.eclipse.gmf.ecore.editor.EPackage_2005"
+ name="EPackage"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice="org.eclipse.gmf.ecore.edit.helpers.EPackage_2005EditHelperAdvice">
<specializes id="org.eclipse.gmf.ecore.editor.EPackage_79"/>
@@ -247,6 +252,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<metamodelType
id="org.eclipse.gmf.ecore.editor.EDataType_2006"
+ name="EDataType"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="EDataType"
edithelper="org.eclipse.gmf.ecore.edit.helpers.EDataType_2006EditHelper">
@@ -257,6 +263,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<metamodelType
id="org.eclipse.gmf.ecore.editor.EEnum_2007"
+ name="EEnum"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="EEnum"
edithelper="org.eclipse.gmf.ecore.edit.helpers.EEnum_2007EditHelper">
@@ -267,6 +274,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<metamodelType
id="org.eclipse.gmf.ecore.editor.EStringToStringMapEntry_2008"
+ name="Annotation details"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="EStringToStringMapEntry"
edithelper="org.eclipse.gmf.ecore.edit.helpers.EStringToStringMapEntry_2008EditHelper">
@@ -277,6 +285,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<metamodelType
id="org.eclipse.gmf.ecore.editor.EEnumLiteral_2009"
+ name="EEnumLiteral"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="EEnumLiteral"
edithelper="org.eclipse.gmf.ecore.edit.helpers.EEnumLiteral_2009EditHelper">
@@ -287,6 +296,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<metamodelType
id="org.eclipse.gmf.ecore.editor.EClass_1001"
+ name="EClass"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="EClass"
edithelper="org.eclipse.gmf.ecore.edit.helpers.EClass_1001EditHelper">
@@ -297,6 +307,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<specializationType
id="org.eclipse.gmf.ecore.editor.EPackage_1002"
+ name="EPackage"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice="org.eclipse.gmf.ecore.edit.helpers.EPackage_1002EditHelperAdvice">
<specializes id="org.eclipse.gmf.ecore.editor.EPackage_79"/>
@@ -307,6 +318,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<specializationType
id="org.eclipse.gmf.ecore.editor.EAnnotation_1003"
+ name="EAnnotation"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice="org.eclipse.gmf.ecore.edit.helpers.EAnnotation_1003EditHelperAdvice">
<specializes id="org.eclipse.gmf.ecore.editor.EAnnotation_2003"/>
@@ -317,6 +329,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<specializationType
id="org.eclipse.gmf.ecore.editor.EDataType_1004"
+ name="EDataType"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice="org.eclipse.gmf.ecore.edit.helpers.EDataType_1004EditHelperAdvice">
<specializes id="org.eclipse.gmf.ecore.editor.EDataType_2006"/>
@@ -327,6 +340,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<specializationType
id="org.eclipse.gmf.ecore.editor.EEnum_1005"
+ name="EEnum"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice="org.eclipse.gmf.ecore.edit.helpers.EEnum_1005EditHelperAdvice">
<specializes id="org.eclipse.gmf.ecore.editor.EEnum_2007"/>
@@ -337,6 +351,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<specializationType
id="org.eclipse.gmf.ecore.editor.EAnnotationReferences_3001"
+ name="EAnnotation reference"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice="org.eclipse.gmf.ecore.edit.helpers.EAnnotationReferences_3001EditHelperAdvice">
<specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
@@ -347,6 +362,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<metamodelType
id="org.eclipse.gmf.ecore.editor.EReference_3002"
+ name="Association"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="EReference"
edithelper="org.eclipse.gmf.ecore.edit.helpers.EReference_3002EditHelper">
@@ -357,6 +373,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<specializationType
id="org.eclipse.gmf.ecore.editor.EReference_3003"
+ name="Aggregation"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice="org.eclipse.gmf.ecore.edit.helpers.EReference_3003EditHelperAdvice">
<specializes id="org.eclipse.gmf.ecore.editor.EReference_3002"/>
@@ -367,6 +384,7 @@
<metamodel nsURI="http://www.eclipse.org/emf/2002/Ecore">
<specializationType
id="org.eclipse.gmf.ecore.editor.EClassESuperTypes_3004"
+ name="Generalization"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice="org.eclipse.gmf.ecore.edit.helpers.EClassESuperTypes_3004EditHelperAdvice">
<specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotation2EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotation2EditPart.java
index 6ac992764..e69fe7691 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotation2EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotation2EditPart.java
@@ -1,5 +1,6 @@
package org.eclipse.gmf.ecore.edit.parts;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import java.util.ArrayList;
import java.util.List;
@@ -37,7 +38,6 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotationEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotationEditPart.java
index 3d9ee54d6..0e7664040 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotationEditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotationEditPart.java
@@ -6,7 +6,7 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -50,6 +50,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -165,6 +167,17 @@ public class EAnnotationEditPart extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotation_source2EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotation_source2EditPart.java
index ff2cd5eaa..7019ce7fb 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotation_source2EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAnnotation_source2EditPart.java
@@ -2,7 +2,7 @@ package org.eclipse.gmf.ecore.edit.parts;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
import org.eclipse.gmf.runtime.notation.View;
@@ -45,6 +45,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -140,6 +142,17 @@ public class EAnnotation_source2EditPart extends CompartmentEditPart implements
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAttributeEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAttributeEditPart.java
index b7f7a81fa..b48afcc9f 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAttributeEditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EAttributeEditPart.java
@@ -6,7 +6,7 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -50,6 +50,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -165,6 +167,17 @@ public class EAttributeEditPart extends CompartmentEditPart implements ITextAwar
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClass2EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClass2EditPart.java
index 4890deeb3..278b2b11b 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClass2EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClass2EditPart.java
@@ -6,7 +6,7 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -50,6 +50,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -165,6 +167,17 @@ public class EClass2EditPart extends CompartmentEditPart implements ITextAwareEd
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClassEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClassEditPart.java
index cd5298168..6903b90c6 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClassEditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClassEditPart.java
@@ -1,5 +1,6 @@
package org.eclipse.gmf.ecore.edit.parts;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import java.util.ArrayList;
import java.util.List;
@@ -37,7 +38,6 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClass_nameEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClass_nameEditPart.java
index c7c22e618..2d85bfd68 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClass_nameEditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EClass_nameEditPart.java
@@ -2,7 +2,7 @@ package org.eclipse.gmf.ecore.edit.parts;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
import org.eclipse.gmf.runtime.notation.View;
@@ -45,6 +45,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -140,6 +142,17 @@ public class EClass_nameEditPart extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataType2EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataType2EditPart.java
index 964d0881a..05990df18 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataType2EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataType2EditPart.java
@@ -1,5 +1,6 @@
package org.eclipse.gmf.ecore.edit.parts;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import java.util.ArrayList;
import java.util.List;
@@ -37,7 +38,6 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataTypeEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataTypeEditPart.java
index 7589fadc8..57907b527 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataTypeEditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataTypeEditPart.java
@@ -6,7 +6,7 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -50,6 +50,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -165,6 +167,17 @@ public class EDataTypeEditPart extends CompartmentEditPart implements ITextAware
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataType_name2EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataType_name2EditPart.java
index 63076596c..6868972c9 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataType_name2EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EDataType_name2EditPart.java
@@ -2,7 +2,7 @@ package org.eclipse.gmf.ecore.edit.parts;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
import org.eclipse.gmf.runtime.notation.View;
@@ -45,6 +45,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -140,6 +142,17 @@ public class EDataType_name2EditPart extends CompartmentEditPart implements ITex
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnum2EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnum2EditPart.java
index 813e834c9..94d77c633 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnum2EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnum2EditPart.java
@@ -1,5 +1,6 @@
package org.eclipse.gmf.ecore.edit.parts;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import java.util.ArrayList;
import java.util.List;
@@ -37,7 +38,6 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnumEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnumEditPart.java
index 080f6d8c7..7aab061c7 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnumEditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnumEditPart.java
@@ -6,7 +6,7 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -50,6 +50,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -165,6 +167,17 @@ public class EEnumEditPart extends CompartmentEditPart implements ITextAwareEdit
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnumLiteralEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnumLiteralEditPart.java
index 1a19d1684..d87ed72c8 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnumLiteralEditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnumLiteralEditPart.java
@@ -6,7 +6,7 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -50,6 +50,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -165,6 +167,17 @@ public class EEnumLiteralEditPart extends CompartmentEditPart implements ITextAw
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnum_name2EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnum_name2EditPart.java
index e42e87bed..3e5c8c638 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnum_name2EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EEnum_name2EditPart.java
@@ -2,7 +2,7 @@ package org.eclipse.gmf.ecore.edit.parts;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
import org.eclipse.gmf.runtime.notation.View;
@@ -45,6 +45,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -140,6 +142,17 @@ public class EEnum_name2EditPart extends CompartmentEditPart implements ITextAwa
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EOperationEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EOperationEditPart.java
index 8f0cf22c4..ad6955c6a 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EOperationEditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EOperationEditPart.java
@@ -6,7 +6,7 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -50,6 +50,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -165,6 +167,17 @@ public class EOperationEditPart extends CompartmentEditPart implements ITextAwar
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage2EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage2EditPart.java
index bd749411d..d64bb99c4 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage2EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage2EditPart.java
@@ -1,5 +1,6 @@
package org.eclipse.gmf.ecore.edit.parts;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import java.util.ArrayList;
import java.util.List;
@@ -37,7 +38,6 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage3EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage3EditPart.java
index 9e767940a..ccaa632e9 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage3EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage3EditPart.java
@@ -6,7 +6,7 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -50,6 +50,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -165,6 +167,17 @@ public class EPackage3EditPart extends CompartmentEditPart implements ITextAware
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage_name2EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage_name2EditPart.java
index 6ceb37eb4..5085b3775 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage_name2EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EPackage_name2EditPart.java
@@ -2,7 +2,7 @@ package org.eclipse.gmf.ecore.edit.parts;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
import org.eclipse.gmf.runtime.notation.View;
@@ -45,6 +45,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -140,6 +142,17 @@ public class EPackage_name2EditPart extends CompartmentEditPart implements IText
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EReference_name2EditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EReference_name2EditPart.java
index 51440a9c5..17313c06e 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EReference_name2EditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EReference_name2EditPart.java
@@ -3,7 +3,7 @@ package org.eclipse.gmf.ecore.edit.parts;
import org.eclipse.draw2d.ConnectionLocator;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.gef.EditPolicy;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -43,6 +43,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -150,6 +152,17 @@ public class EReference_name2EditPart extends LabelEditPart implements ITextAwar
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EReference_nameEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EReference_nameEditPart.java
index 9fcf815f8..0a9387a4f 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EReference_nameEditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EReference_nameEditPart.java
@@ -3,7 +3,7 @@ package org.eclipse.gmf.ecore.edit.parts;
import org.eclipse.draw2d.ConnectionLocator;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.gef.EditPolicy;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -43,6 +43,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -150,6 +152,17 @@ public class EReference_nameEditPart extends LabelEditPart implements ITextAware
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EStringToStringMapEntryEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EStringToStringMapEntryEditPart.java
index 34f208cbb..c43d41c9c 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EStringToStringMapEntryEditPart.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/EStringToStringMapEntryEditPart.java
@@ -6,7 +6,7 @@ import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-//import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
//import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.ecore.edit.policies.LabelDirectEditPolicy;
@@ -50,6 +50,8 @@ import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -165,6 +167,17 @@ public class EStringToStringMapEntryEditPart extends CompartmentEditPart impleme
/**
* @generated
*/
+ public void setLabelText(String text) {
+ getLabel().setText(text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
+ ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
protected void refreshUnderline() {
FontStyle style = (FontStyle) getPrimaryView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/ITextAwareEditPart.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/ITextAwareEditPart.java
deleted file mode 100644
index 849e2a836..000000000
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/ITextAwareEditPart.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.gmf.ecore.edit.parts;
-
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-
-/**
- * @generated
- */
-public interface ITextAwareEditPart extends org.eclipse.gef.GraphicalEditPart {
-
- /**
- * @generated
- */
- public String getEditText();
-
- /**
- * @generated
- */
- public ICellEditorValidator getEditTextValidator();
-
- /**
- * @generated
- */
- public ParserOptions getParserOptions();
-
- /**
- * @generated
- */
- public IParser getParser();
-
- /**
- * @generated
- */
- public IContentAssistProcessor getCompletionProcessor();
-}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/TextDirectEditManager.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/TextDirectEditManager.java
deleted file mode 100644
index 1794b54d5..000000000
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/parts/TextDirectEditManager.java
+++ /dev/null
@@ -1,383 +0,0 @@
-package org.eclipse.gmf.ecore.edit.parts;
-
-import org.eclipse.draw2d.FigureUtilities;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.tools.CellEditorLocator;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.contentassist.ContentAssistantHelper;
-import org.eclipse.gmf.runtime.diagram.ui.internal.l10n.DiagramFontRegistry;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel;
-import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
-import org.eclipse.gmf.runtime.gef.ui.internal.parts.TextCellEditorEx;
-import org.eclipse.gmf.runtime.gef.ui.internal.parts.WrapTextCellEditor;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.gef.EditPolicy;
-
-import org.eclipse.gmf.ecore.edit.policies.EcoreTextSelectionEditPolicy;
-
-/**
- * @generated
- */
-public class TextDirectEditManager extends DirectEditManager {
-
- /**
- * @generated
- */
- private Color proposalPopupBackgroundColor = null;
-
- /**
- * @generated
- */
- private Color proposalPopupForegroundColor = null;
-
- /**
- * @generated
- */
- private boolean committed = false;
-
- /**
- * @generated
- */
- private boolean listenersAttached = true;
-
- /**
- * @generated
- */
- static private class WrapTextCellEditorLocator implements CellEditorLocator {
-
- private WrapLabel wrapLabel;
-
- public WrapTextCellEditorLocator(WrapLabel wrapLabel) {
- super();
- this.wrapLabel = wrapLabel;
- }
-
- public WrapLabel getWrapLabel() {
- return wrapLabel;
- }
-
- public void relocate(CellEditor celleditor) {
- Text text = (Text) celleditor.getControl();
- Rectangle rect = getWrapLabel().getTextBounds().getCopy();
- getWrapLabel().translateToAbsolute(rect);
-
- if (getWrapLabel().isTextWrapped() && getWrapLabel().getText().length() > 0)
- rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));
- else {
- int avr = FigureUtilities.getFontMetrics(text.getFont()).getAverageCharWidth();
- rect.setSize(new Dimension(text.computeSize(SWT.DEFAULT, SWT.DEFAULT)).expand(avr * 2, 0));
- }
-
- if (!rect.equals(new Rectangle(text.getBounds())))
- text.setBounds(rect.x, rect.y, rect.width, rect.height);
- }
-
- }
-
- /**
- * @generated
- */
- static private class TextCellEditorLocator implements CellEditorLocator {
-
- private Label label;
-
- public TextCellEditorLocator(Label label) {
- super();
- this.label = label;
- }
-
- public Label getLabel() {
- return label;
- }
-
- public void relocate(CellEditor celleditor) {
- Text text = (Text) celleditor.getControl();
- Rectangle rect = getLabel().getTextBounds().getCopy();
- getLabel().translateToAbsolute(rect);
-
- int avr = FigureUtilities.getFontMetrics(text.getFont()).getAverageCharWidth();
- rect.setSize(new Dimension(text.computeSize(SWT.DEFAULT, SWT.DEFAULT)).expand(avr * 2, 0));
-
- if (!rect.equals(new Rectangle(text.getBounds())))
- text.setBounds(rect.x, rect.y, rect.width, rect.height);
- }
-
- }
-
- /**
- * @generated
- */
- public TextDirectEditManager(ITextAwareEditPart source) {
- super(source, getTextCellEditorClass(source), getCellEditorLocator(source.getFigure()));
- }
-
- /**
- * @generated
- */
- public TextDirectEditManager(GraphicalEditPart source, Class editorType, CellEditorLocator locator) {
- super(source, editorType, locator);
- }
-
- /**
- * @generated
- */
- private static CellEditorLocator getCellEditorLocator(IFigure label) {
- if (label instanceof Label) {
- return new TextCellEditorLocator((Label) label);
- }
- return new WrapTextCellEditorLocator((WrapLabel) label);
- }
-
- /**
- * @generated
- */
- private static Class getTextCellEditorClass(ITextAwareEditPart source) {
- IFigure label = source.getFigure();
-
- if (label instanceof WrapLabel && ((WrapLabel) label).isTextWrapped())
- return WrapTextCellEditor.class;
-
- return TextCellEditorEx.class;
- }
-
- /**
- * @generated
- */
- protected Font getScaledFont(IFigure label) {
- Font scaledFont = label.getFont();
- FontData data = scaledFont.getFontData()[0];
- Dimension fontSize = new Dimension(0, MapModeUtil.getMapMode(label).DPtoLP(data.getHeight()));
- label.translateToAbsolute(fontSize);
-
- if (Math.abs(data.getHeight() - fontSize.height) < 2)
- fontSize.height = data.getHeight();
-
- data.setHeight(fontSize.height);
- Font newFont = DiagramFontRegistry.getInstance().getFont(null, data);
- return newFont;
- }
-
- /**
- * @generated
- */
- protected void initCellEditor() {
- committed = false;
-
- // Get the Text Compartments Edit Part
- ITextAwareEditPart textEP = (ITextAwareEditPart) getEditPart();
-
- setEditText(textEP.getEditText());
-
- IFigure label = textEP.getFigure();
- Assert.isNotNull(label);
- Text text = (Text) getCellEditor().getControl();
- // scale the font accordingly to the zoom level
- text.setFont(getScaledFont(label));
-
- // register a validator on the cell editor
- getCellEditor().setValidator(textEP.getEditTextValidator());
-
- if (textEP.getParser() != null) {
- IContentAssistProcessor processor = textEP.getCompletionProcessor();
- if (processor != null) {
- // register content assist
- proposalPopupBackgroundColor = new Color(getCellEditor().getControl().getShell().getDisplay(), new RGB(254, 241, 233));
- proposalPopupForegroundColor = new Color(getCellEditor().getControl().getShell().getDisplay(), new RGB(0, 0, 0));
-
- ContentAssistantHelper.createTextContentAssistant(text, proposalPopupForegroundColor, proposalPopupBackgroundColor, processor);
- }
- }
- }
-
- /**
- * @generated
- */
- protected void commit() {
- Shell activeShell = Display.getCurrent().getActiveShell();
- if (activeShell != null && getCellEditor().getControl().getShell().equals(activeShell.getParent())) {
- Control[] children = activeShell.getChildren();
- if (children.length == 1 && children[0] instanceof Table) {
- /*
- * CONTENT ASSIST: focus is lost to the content assist pop up -
- * stay in focus
- */
- getCellEditor().getControl().setVisible(true);
- ((TextCellEditorEx) getCellEditor()).setDeactivationLock(true);
- return;
- }
- }
-
- // content assist hacks
- if (committed) {
- bringDown();
- return;
- }
- committed = true;
- super.commit();
- }
-
- /**
- * @generated
- */
- protected void bringDown() {
- if (proposalPopupForegroundColor != null) {
- proposalPopupForegroundColor.dispose();
- proposalPopupForegroundColor = null;
- }
- if (proposalPopupBackgroundColor != null) {
- proposalPopupBackgroundColor.dispose();
- proposalPopupBackgroundColor = null;
- }
-
- // myee - RATLC00523014: crashes when queued in asyncExec()
- eraseFeedback();
-
- Display.getCurrent().asyncExec(new Runnable() {
-
- public void run() {
- // Content Assist hack - allow proper cleanup on childen
- // controls
- TextDirectEditManager.super.bringDown();
- }
- });
- }
-
- /**
- * @generated
- */
- public void setEditText(String toEdit) {
-
- // Get the cell editor
- CellEditor cellEditor = getCellEditor();
-
- // IF the cell editor doesn't exist yet...
- if (cellEditor == null) {
- // Do nothing
- return;
- }
-
- // Get the Text Compartment Edit Part
- ITextAwareEditPart textEP = (ITextAwareEditPart) getEditPart();
-
- // Get the Text control
- Text textControl = (Text) cellEditor.getControl();
-
- // Get the Text Edit Part's Figure (WrapLabel)
- IFigure label = textEP.getFigure();
- Assert.isNotNull(label);
- // Set the Figures text
- if (label instanceof Label) {
- ((Label) label).setText(toEdit);
- } else {
- ((WrapLabel) label).setText(toEdit);
- }
- Object pdEditPolicy = textEP.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof EcoreTextSelectionEditPolicy) {
- ((EcoreTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
-
- // See RATLC00522324
- if (cellEditor instanceof TextCellEditorEx) {
- ((TextCellEditorEx) cellEditor).setValueAndProcessEditOccured(toEdit);
- } else {
- cellEditor.setValue(toEdit);
- }
-
- // Set the controls text and position the caret at the end of the text
- textControl.setSelection(toEdit.length());
- }
-
- /**
- * @generated
- */
- public void show(char initialChar) {
-
- show();
- // Set the cell editor text to the initial character
- String initialString = String.valueOf(initialChar);
- setEditText(initialString);
-
- }
-
- /**
- * @generated
- */
- public void show(Point location) {
- show();
- sendMouseClick(location);
- }
-
- /**
- * @generated
- */
- private void sendMouseClick(Point location) {
-
- final Display currDisplay = Display.getCurrent();
- final Point currLocation = location;
- new Thread() {
-
- Event event;
-
- public void run() {
- event = new Event();
- event.type = SWT.MouseDown;
- event.button = 1;
- event.x = currLocation.x;
- event.y = currLocation.y;
- currDisplay.post(event);
- event.type = SWT.MouseUp;
- currDisplay.post(event);
- }
- }.start();
- }
-
- /**
- * @generated
- */
- protected void unhookListeners() {
- if (listenersAttached) {
- listenersAttached = false;
- super.unhookListeners();
- }
- }
-
- /**
- * @generated
- */
- protected void setCellEditor(CellEditor editor) {
- super.setCellEditor(editor);
- if (editor != null) {
- listenersAttached = true;
- }
- }
-
- /**
- * @generated
- */
- public void showFeedback() {
- try {
- getEditPart().getRoot();
- super.showFeedback();
- } catch (Exception e) {
- // TODO: handle exception
- }
- }
-}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/LabelDirectEditPolicy.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/LabelDirectEditPolicy.java
index 9d6994e9b..8744889f2 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/LabelDirectEditPolicy.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/edit/policies/LabelDirectEditPolicy.java
@@ -8,11 +8,11 @@ import org.eclipse.gef.requests.DirectEditRequest;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.diagram.ui.commands.EtoolsProxyCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel;
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.gef.ui.internal.parts.TextCellEditorEx;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.ecore.edit.parts.ITextAwareEditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.ecore.edit.policies.EcoreTextSelectionEditPolicy;
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/providers/EcoreEditPartProvider.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/providers/EcoreEditPartProvider.java
index ae9b7f7e9..6cd8c6c69 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/providers/EcoreEditPartProvider.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/providers/EcoreEditPartProvider.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.common.core.service.IOperation;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.gmf.ecore.edit.parts.EcoreEditPartFactory;
@@ -117,7 +118,7 @@ public class EcoreEditPartProvider extends AbstractEditPartProvider {
*/
public synchronized boolean provides(IOperation operation) {
if (operation instanceof CreateGraphicEditPartOperation) {
- View view = ((CreateGraphicEditPartOperation) operation).getView();
+ View view = ((IEditPartOperation) operation).getView();
if (isAllowCaching() && getCachedPart(view) != null) {
return true;
}

Back to the top