Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormgolubev2012-05-21 23:55:03 -0400
committermgolubev2012-05-21 23:55:03 -0400
commit45209051a3d2c748d443c5e2aecc4e63d80706cd (patch)
tree2bf07a41cde4f69edd4bb486da2aac97337b20f8
parent9950445ff17a1c0936177aac78457852aed729e0 (diff)
downloadorg.eclipse.gmf-tooling-45209051a3d2c748d443c5e2aecc4e63d80706cd.tar.gz
org.eclipse.gmf-tooling-45209051a3d2c748d443c5e2aecc4e63d80706cd.tar.xz
org.eclipse.gmf-tooling-45209051a3d2c748d443c5e2aecc4e63d80706cd.zip
[379484] - Vertical Labels as first class citizens
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/RuntimeLabelsSupport.qvto37
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt113
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/TextFeedback.xpt91
-rw-r--r--plugins/org.eclipse.gmf.tooling.runtime/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/edit/policies/labels/IRefreshableFeedbackEditPolicy.java11
5 files changed, 226 insertions, 27 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/RuntimeLabelsSupport.qvto b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/RuntimeLabelsSupport.qvto
new file mode 100644
index 000000000..c877b2258
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/RuntimeLabelsSupport.qvto
@@ -0,0 +1,37 @@
+modeltype gmfgen uses "http://www.eclipse.org/gmf/2009/GenModel";
+
+library RuntimeLabelsSupport;
+
+helper isVerticalLabel(commonBase : gmfgen::GenCommonBase) : Boolean {
+ return
+ commonBase.viewmap.oclIsKindOf(gmfgen::ParentAssignedViewmap)
+ and commonBase.viewmap.oclAsType(gmfgen::ParentAssignedViewmap).figureQualifiedClassName = getVerticalLabelFQN();
+}
+
+helper getSimpleLabelDelegateFQN() : String {
+ return getRuntimeLabelPackage().concat(".").concat("SimpleLabelDelegate");
+}
+
+helper getVerticalLabelFQN() : String {
+ return getRuntimeLabelPackage().concat(".").concat("VerticalLabel");
+}
+
+helper getVerticalLabelDelegateFQN() : String {
+ return getRuntimeLabelPackage().concat(".").concat("VerticalLabelDelegate");
+}
+
+helper getVerticalLabelCellEditorLocatorFQN() : String {
+ return getRuntimeLabelPackage().concat(".").concat("VerticalLabelCellEditorLocator");
+}
+
+helper getRuntimeLabelPackage() : String {
+ return "org.eclipse.gmf.tooling.runtime.draw2d.labels";
+}
+
+helper supportsVerticalLabels(diagram : gmfgen::GenDiagram) : Boolean {
+ return diagram.getAllNodes()->exists(n | hasVerticalLabels(n))
+}
+
+helper hasVerticalLabels(node : gmfgen::GenNode) : Boolean {
+ return isVerticalLabel(node) or node.labels->exists(label | isVerticalLabel(label))
+}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt
index a5f5279a7..06721da76 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt
@@ -14,6 +14,7 @@
«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
«EXTENSION xpt::diagram::ViewmapAttributesUtils»
«EXTENSION impl::diagram::editparts::ChoiceUtils»
+«EXTENSION impl::diagram::editparts::RuntimeLabelsSupport»
«EXTENSION impl::parsers::expression»
«DEFINE fields FOR gmfgen::GenCommonBase-»
@@ -33,6 +34,9 @@
«EXPAND xpt::Common::generatedMemberComment»
private String defaultText;
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ org.eclipse.gmf.runtime.diagram.ui.label.ILabelDelegate labelDelegate;
«ENDDEFINE»
«DEFINE methods(needsRefreshBounds : Boolean, readOnly : Boolean, useElementIcon : Boolean, viewmap : gmfgen::Viewmap,
@@ -95,6 +99,8 @@
«EXPAND refreshFont-»
+ «EXPAND refreshSelectionFeedback-»
+
«EXPAND setFontColor-»
«EXPAND addSemanticListeners-»
@@ -112,6 +118,10 @@
«IF isOclChoiceLabel() or isViewExpressionDefiedAndOcl()-»
«EXPAND getOclRegistrator-»
«ENDIF-»
+
+ «EXPAND getLabelDelegate -»
+
+ «EXPAND getAdapter -»
«ENDDEFINE»
«DEFINE labelSetterName FOR gmfgen::ParentAssignedViewmap-»
@@ -125,9 +135,15 @@
protected String getLabelTextHelper(org.eclipse.draw2d.IFigure figure) {
if (figure instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
return ((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) figure).getText();
- } else {
+ } «IF isVerticalLabel(self)-»
+ else if (figure instanceof «getVerticalLabelFQN()») {
+ return ((«getVerticalLabelFQN()») figure).getText();
+ } «ENDIF-»
+ else if (figure instanceof org.eclipse.draw2d.Label) {
return ((org.eclipse.draw2d.Label) figure).getText();
- }
+ } else {
+ return getLabelDelegate().getText();
+ }
}
«ENDDEFINE»
@@ -136,8 +152,14 @@
protected void setLabelTextHelper(org.eclipse.draw2d.IFigure figure, String text) {
if (figure instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) figure).setText(text);
- } else {
+ } «IF isVerticalLabel(self)-»
+ else if (figure instanceof «getVerticalLabelFQN()») {
+ ((«getVerticalLabelFQN()») figure).setText(text);
+ } «ENDIF-»
+ else if (figure instanceof org.eclipse.draw2d.Label) {
((org.eclipse.draw2d.Label) figure).setText(text);
+ } else {
+ getLabelDelegate().setText(text);
}
}
«ENDDEFINE»
@@ -147,8 +169,15 @@
protected org.eclipse.swt.graphics.Image getLabelIconHelper(org.eclipse.draw2d.IFigure figure) {
if (figure instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
return ((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) figure).getIcon();
- } else {
+ } «IF isVerticalLabel(self)-»
+ else if (figure instanceof «getVerticalLabelFQN()») {
+ //icons are not supported for verical labels now
+ return null;
+ } «ENDIF-»
+ else if (figure instanceof org.eclipse.draw2d.Label) {
return ((org.eclipse.draw2d.Label) figure).getIcon();
+ } else {
+ return getLabelDelegate().getIcon(0);
}
}
«ENDDEFINE»
@@ -158,9 +187,48 @@
protected void setLabelIconHelper(org.eclipse.draw2d.IFigure figure, org.eclipse.swt.graphics.Image icon) {
if (figure instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) figure).setIcon(icon);
- } else {
+ return;
+ } «IF isVerticalLabel(self)-»
+ else if (figure instanceof «getVerticalLabelFQN()») {
+ //icons are not supported for verical labels now, nothing to do
+ return;
+ } «ENDIF-»
+ else if (figure instanceof org.eclipse.draw2d.Label) {
((org.eclipse.draw2d.Label) figure).setIcon(icon);
+ return;
+ } else {
+ getLabelDelegate().setIcon(icon, 0);
+ }
+ }
+«ENDDEFINE»
+
+«DEFINE getLabelDelegate FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ private org.eclipse.gmf.runtime.diagram.ui.label.ILabelDelegate getLabelDelegate(){
+ if (labelDelegate == null){
+ org.eclipse.draw2d.IFigure label = getFigure();
+ if (label instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel){
+ labelDelegate = new org.eclipse.gmf.runtime.diagram.ui.label.WrappingLabelDelegate((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel)label);
+ } «IF isVerticalLabel(self)-»
+ else if (figure instanceof «getVerticalLabelFQN()») {
+ labelDelegate = new «getVerticalLabelDelegateFQN()»((«getVerticalLabelFQN()»)figure);
+ } «ENDIF-»
+ else {
+ labelDelegate = new «getSimpleLabelDelegateFQN()»((org.eclipse.draw2d.Label)label);
+ }
+ }
+ return labelDelegate;
+ }
+«ENDDEFINE»
+
+«DEFINE getAdapter FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND CodeStyle::override-»
+ public Object getAdapter(Class key) {
+ if (org.eclipse.gmf.runtime.diagram.ui.label.ILabelDelegate.class.equals(key)){
+ return getLabelDelegate();
}
+ return super.getAdapter(key);
}
«ENDDEFINE»
@@ -256,14 +324,7 @@
«EXPAND xpt::Common::generatedMemberComment»
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
- ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
- ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») sfEditPolicy).refreshFeedback();
- }
+ refreshSelectionFeedback();
}
«ENDDEFINE»
@@ -446,14 +507,7 @@
protected void refreshLabel() {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- Object pdEditPolicy = getEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
- ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
- ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») sfEditPolicy).refreshFeedback();
- }
+ refreshSelectionFeedback();
}
«ENDDEFINE»
@@ -496,6 +550,23 @@
}
}
«ENDDEFINE»
+
+«DEFINE refreshSelectionFeedback FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ private void refreshSelectionFeedback() {
+ requestEditPolicyFeedbackRefresh(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE);
+ requestEditPolicyFeedbackRefresh(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE);
+ }
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ private void requestEditPolicyFeedbackRefresh(String editPolicyKey) {
+ Object editPolicy = getEditPolicy(editPolicyKey);
+ if (editPolicy instanceof org.eclipse.gmf.tooling.runtime.edit.policies.labels.IRefreshableFeedbackEditPolicy) {
+ ((org.eclipse.gmf.tooling.runtime.edit.policies.labels.IRefreshableFeedbackEditPolicy)editPolicy).refreshFeedback();
+ }
+ }
+«ENDDEFINE»
+
«DEFINE setFontColor FOR gmfgen::GenCommonBase-»
«EXPAND xpt::Common::generatedMemberComment»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/TextFeedback.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/TextFeedback.xpt
index 9d484b0d2..8446084ac 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/TextFeedback.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/TextFeedback.xpt
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2009 Borland Software Corporation
+ * Copyright (c) 2006, 2009, 2012 Borland Software Corporation and others
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Dmitry Stadnik (Borland) - initial API and implementation
+ * Michael Golubev - template refactored according to common GMFT conventions
*/
«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
@@ -17,21 +18,38 @@
package «editPoliciesPackageName»;
«EXPAND xpt::Common::generatedClassComment»
-public class «textSelectionEditPolicyClassName» extends org.eclipse.gef.editpolicies.SelectionEditPolicy {
+public class «textSelectionEditPolicyClassName» «EXPAND TextSelectionEditPolicy_extendsClause» «EXPAND TextSelectionEditPolicy_implementsClause» {
«EXPAND textFeedback FOR self-»
+
+ «EXPAND TextSelectionEditPolicy_additions -»
}
«ENDDEFINE»
+«DEFINE TextSelectionEditPolicy_extendsClause FOR gmfgen::GenDiagram»extends org.eclipse.gef.editpolicies.SelectionEditPolicy«ENDDEFINE»
+«DEFINE TextSelectionEditPolicy_implementsClause FOR gmfgen::GenDiagram»implements org.eclipse.gmf.tooling.runtime.edit.policies.labels.IRefreshableFeedbackEditPolicy«ENDDEFINE»
+
+«DEFINE TextSelectionEditPolicy_additions FOR gmfgen::GenDiagram»«ENDDEFINE»
+
«DEFINE TextNonResizableEditPolicy FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::copyright FOR editorGen-»
package «editPoliciesPackageName»;
«EXPAND xpt::Common::generatedClassComment»
-public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx {
+public class «textNonResizableEditPolicyClassName» «EXPAND TextNonResizableEditPolicy_extendsClause» «EXPAND TextNonResizableEditPolicy_implementsClause» {
«EXPAND textFeedback FOR self-»
+
+ «EXPAND TextNonResizableEditPolicy_createSelectionHandles-»
+
+ «EXPAND TextNonResizableEditPolicy_additions-»
+}
+«ENDDEFINE»
+«DEFINE TextNonResizableEditPolicy_extendsClause FOR gmfgen::GenDiagram»extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx«ENDDEFINE»
+«DEFINE TextNonResizableEditPolicy_implementsClause FOR gmfgen::GenDiagram»implements org.eclipse.gmf.tooling.runtime.edit.policies.labels.IRefreshableFeedbackEditPolicy«ENDDEFINE»
+
+«DEFINE TextNonResizableEditPolicy_createSelectionHandles FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected java.util.List createSelectionHandles() {
org.eclipse.gef.handles.MoveHandle moveHandle =
@@ -40,10 +58,11 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
moveHandle.setDragTracker(new org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx(getHost()));
return java.util.Collections.singletonList(moveHandle);
}
-}
«ENDDEFINE»
-«DEFINE textFeedback FOR gmfgen::GenDiagram»
+«DEFINE TextNonResizableEditPolicy_additions FOR gmfgen::GenDiagram»«ENDDEFINE»
+
+«DEFINE textFeedback_fields FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.draw2d.IFigure selectionFeedbackFigure;
@@ -52,7 +71,41 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
«EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.draw2d.FigureListener hostPositionListener;
+«ENDDEFINE»
+
+«DEFINE textFeedback FOR gmfgen::GenDiagram»
+
+ «EXPAND textFeedback_fields-»
+
+ «EXPAND textFeedback_showPrimarySelection-»
+
+ «EXPAND textFeedback_showSelection-»
+
+ «EXPAND textFeedback_hideSelection-»
+
+ «EXPAND textFeedback_showFocus-»
+
+ «EXPAND textFeedback_hideFocus-»
+
+ «EXPAND textFeedback_getFeedbackBounds-»
+
+ «EXPAND textFeedback_createSelectionFeedbackFigure-»
+
+ «EXPAND textFeedback_createFocusFeedbackFigure-»
+
+ «EXPAND textFeedback_updateLabel-»
+
+ «EXPAND textFeedback_refreshSelectionFeedback-»
+
+ «EXPAND textFeedback_refreshFocusFeedback-»
+
+ «EXPAND textFeedback_refreshFeedback-»
+
+ «EXPAND textFeedback_getHostPositionListener-»
+
+«ENDDEFINE»
+«DEFINE textFeedback_showPrimarySelection FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected void showPrimarySelection() {
if (getHostFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
@@ -63,7 +116,9 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
showFocus();
}
}
+«ENDDEFINE»
+«DEFINE textFeedback_showSelection FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected void showSelection() {
if (getHostFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
@@ -77,7 +132,9 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
hideFocus();
}
}
+«ENDDEFINE»
+«DEFINE textFeedback_hideSelection FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected void hideSelection() {
if (getHostFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
@@ -92,7 +149,9 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
hideFocus();
}
}
+«ENDDEFINE»
+«DEFINE textFeedback_showFocus FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected void showFocus() {
if (getHostFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
@@ -103,7 +162,9 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
refreshFocusFeedback();
}
}
+«ENDDEFINE»
+«DEFINE textFeedback_hideFocus FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected void hideFocus() {
if (getHostFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
@@ -112,10 +173,12 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
if (focusFeedbackFigure != null) {
removeFeedback(focusFeedbackFigure);
focusFeedbackFigure = null;
- }
+ }
}
}
+«ENDDEFINE»
+«DEFINE textFeedback_getFeedbackBounds FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.geometry.Rectangle getFeedbackBounds() {
org.eclipse.draw2d.geometry.Rectangle bounds;
@@ -129,7 +192,9 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
getFeedbackLayer().translateToRelative(bounds);
return bounds;
}
+«ENDDEFINE»
+«DEFINE textFeedback_createSelectionFeedbackFigure FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createSelectionFeedbackFigure() {
if (getHostFigure() instanceof org.eclipse.draw2d.Label) {
@@ -144,7 +209,9 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
return feedbackFigure;
}
}
+«ENDDEFINE»
+«DEFINE textFeedback_createFocusFeedbackFigure FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createFocusFeedbackFigure() {
return new org.eclipse.draw2d.Figure() {
@@ -154,7 +221,9 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
}
};
}
+«ENDDEFINE»
+«DEFINE textFeedback_updateLabel FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected void updateLabel(org.eclipse.draw2d.Label target) {
org.eclipse.draw2d.Label source = (org.eclipse.draw2d.Label) getHostFigure();
@@ -162,7 +231,9 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
target.setTextAlignment(source.getTextAlignment());
target.setFont(source.getFont());
}
+«ENDDEFINE»
+«DEFINE textFeedback_refreshSelectionFeedback FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected void refreshSelectionFeedback() {
if (selectionFeedbackFigure != null) {
@@ -174,20 +245,27 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
}
}
}
+«ENDDEFINE»
+«DEFINE textFeedback_refreshFocusFeedback FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
protected void refreshFocusFeedback() {
if (focusFeedbackFigure != null) {
focusFeedbackFigure.setBounds(getFeedbackBounds());
}
}
+«ENDDEFINE»
+«DEFINE textFeedback_refreshFeedback FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND CodeStyle::override-»
public void refreshFeedback() {
refreshSelectionFeedback();
refreshFocusFeedback();
}
+«ENDDEFINE»
+«DEFINE textFeedback_getHostPositionListener FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.draw2d.FigureListener getHostPositionListener() {
if (hostPositionListener == null) {
@@ -200,3 +278,4 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.run
return hostPositionListener;
}
«ENDDEFINE»
+
diff --git a/plugins/org.eclipse.gmf.tooling.runtime/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmf.tooling.runtime/META-INF/MANIFEST.MF
index 9119e04dd..2786cdf56 100644
--- a/plugins/org.eclipse.gmf.tooling.runtime/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.gmf.tooling.runtime/META-INF/MANIFEST.MF
@@ -26,6 +26,7 @@ Export-Package: org.eclipse.gmf.tooling.runtime,
org.eclipse.gmf.tooling.runtime.draw2d,
org.eclipse.gmf.tooling.runtime.draw2d.labels,
org.eclipse.gmf.tooling.runtime.edit.policies.effect,
+ org.eclipse.gmf.tooling.runtime.edit.policies.labels,
org.eclipse.gmf.tooling.runtime.edit.policies.reparent,
org.eclipse.gmf.tooling.runtime.ocl.tracker,
org.eclipse.gmf.tooling.runtime.parsers,
diff --git a/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/edit/policies/labels/IRefreshableFeedbackEditPolicy.java b/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/edit/policies/labels/IRefreshableFeedbackEditPolicy.java
new file mode 100644
index 000000000..84025ecc2
--- /dev/null
+++ b/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/edit/policies/labels/IRefreshableFeedbackEditPolicy.java
@@ -0,0 +1,11 @@
+package org.eclipse.gmf.tooling.runtime.edit.policies.labels;
+
+import org.eclipse.gef.EditPolicy;
+
+public interface IRefreshableFeedbackEditPolicy extends EditPolicy {
+ /**
+ * Notifies the editpolicy that it is time to refresh feedback due to external changes
+ */
+ public void refreshFeedback();
+
+}

Back to the top