Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskovalsky2014-03-31 12:31:20 -0400
committerskovalsky2014-04-03 09:18:43 -0400
commitfb5657c97deea1e56ef6c93434c3e34fe3d9323b (patch)
treea9d14c8b521a7d344add6167647c6f1fdd5ba6a4
parent7bb3830f89e2da349dfb90ca700d6e463d1d626a (diff)
downloadorg.eclipse.gmf-tooling-fb5657c97deea1e56ef6c93434c3e34fe3d9323b.tar.gz
org.eclipse.gmf-tooling-fb5657c97deea1e56ef6c93434c3e34fe3d9323b.tar.xz
org.eclipse.gmf-tooling-fb5657c97deea1e56ef6c93434c3e34fe3d9323b.zip
[361081] - Add additions Nodeditpart.xpt for installing custom
-rw-r--r--plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/ChildNodeLabelEditPart.xtend3
-rw-r--r--plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/CompartmentEditPart.xtend5
-rw-r--r--plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/DiagramEditPart.xtend33
-rw-r--r--plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend3
-rw-r--r--plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/LinkEditPart.xtend3
-rw-r--r--plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/LinkLabelEditPart.xtend4
-rw-r--r--plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/NodeEditPart.xtend3
-rw-r--r--plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/NodeLabelEditPart.xtend4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ChildNodeLabelEditPart.xpt4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/CompartmentEditPart.xpt4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/DiagramEditPart.xpt23
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ExternalNodeLabelEditPart.xpt3
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkEditPart.xpt3
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkLabelEditPart.xpt3
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt5
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt3
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt2
17 files changed, 87 insertions, 21 deletions
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/ChildNodeLabelEditPart.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/ChildNodeLabelEditPart.xtend
index e09e11fbc..7d360dbf5 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/ChildNodeLabelEditPart.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/ChildNodeLabelEditPart.xtend
@@ -55,8 +55,11 @@ import xpt.diagram.editpolicies.TextNonResizableEditPolicy import xpt.CodeStyle
installEditPolicy(org.eclipse.gef.EditPolicy.COMPONENT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy());
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
«xptEditpartsCommon.behaviour(it)»
+ «additionalEditPolicies(it)»
'''
+ def additionalEditPolicies(GenChildLabelNode it) ''''''
+
def handleNotificationEventBody(GenChildLabelNode it) '''
Object feature = event.getFeature();
«xptEditpartsCommon.handleText(it)»
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/CompartmentEditPart.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/CompartmentEditPart.xtend
index a17446cfb..8a639cc4e 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/CompartmentEditPart.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/CompartmentEditPart.xtend
@@ -22,7 +22,7 @@ import xpt.Common
import xpt.Common_qvto
import xpt.Externalizer
import xpt.diagram.editparts.Utils_qvto
-import xpt.providers.ElementTypes import org.eclipse.gmf.codegen.gmfgen.GenLink
+import xpt.providers.ElementTypes import org.eclipse.gmf.codegen.gmfgen.GenLink
@com.google.inject.Singleton class CompartmentEditPart {
@Inject extension Common;
@Inject extension Common_qvto;
@@ -83,8 +83,11 @@ import xpt.providers.ElementTypes import org.eclipse.gmf.codegen.gmfgen.GenLink
«ENDIF»
«xptEditpartsCommon.installCanonicalEditPolicy(it)»
«xptEditpartsCommon.behaviour(it)»
+ «additionalEditPolicies(it)»
'''
+ def additionalEditPolicies(GenCompartment it) ''''''
+
def refreshVisuals(GenCompartment it) '''
«IF isStoringChildPositions(node)»
«generatedMemberComment»
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/DiagramEditPart.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/DiagramEditPart.xtend
index 6b1b6a70f..f5131fc96 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/DiagramEditPart.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/DiagramEditPart.xtend
@@ -42,11 +42,22 @@ import xpt.diagram.commands.CreateShortcutDecorationsCommand
'''
def createDefaultEditPoliciesBody(GenDiagram it) '''
- super.createDefaultEditPolicies();
- «xptEditpartsCommon.installSemanticEditPolicy(it)»
- «xptEditpartsCommon.installCanonicalEditPolicy(it)»
- «xptEditpartsCommon.installCreationEditPolicy(it)»
- «IF generateCreateShortcutAction() && null == editorGen.application»
+ super.createDefaultEditPolicies();
+ «xptEditpartsCommon.installSemanticEditPolicy(it)»
+ «xptEditpartsCommon.installCanonicalEditPolicy(it)»
+ «xptEditpartsCommon.installCreationEditPolicy(it)»
+ «IF generateCreateShortcutAction() && null == editorGen.application»
+ «dragDropEditPolicy(it)»
+ «ENDIF»
+ «IF shouldGenerateDiagramViewmap(it)»
+ «layotEditPolicy(it)»
+ «ENDIF»
+ «xptEditpartsCommon.behaviour(it)»
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
+ «additionalEditPolicies(it)»
+ '''
+
+ def dragDropEditPolicy(GenDiagram it) '''
installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragDropEditPolicy() {
public org.eclipse.gef.commands.Command getDropObjectsCommand(org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest dropRequest) {
java.util.ArrayList<org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor> viewDescriptors = new java.util.ArrayList<org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor>();
@@ -68,8 +79,9 @@ import xpt.diagram.commands.CreateShortcutDecorationsCommand
return null;
}
});
- «ENDIF»
- «IF shouldGenerateDiagramViewmap(it)»
+ '''
+
+ def layotEditPolicy(GenDiagram it) '''
// diagram figure does layout; need to install child editpolicy to show selection feedback
installEditPolicy(org.eclipse.gef.EditPolicy.LAYOUT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
protected org.eclipse.gef.EditPolicy createChildEditPolicy(org.eclipse.gef.EditPart child) {
@@ -84,10 +96,9 @@ import xpt.diagram.commands.CreateShortcutDecorationsCommand
return null;
}
});
- «ENDIF»
- «xptEditpartsCommon.behaviour(it)»
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
-'''
+ '''
+
+ def additionalEditPolicies(GenDiagram it) ''''''
def createFigure(GenDiagram it) '''
«IF shouldGenerateDiagramViewmap(it)»
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend
index b04309ac7..de4ac3984 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend
@@ -49,8 +49,11 @@ import xpt.diagram.editpolicies.TextSelectionEditPolicy
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
installEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE, new «textSelestion.qualifiedClassName(getDiagram())»());
«xptEditpartsCommon.behaviour(it)»
+ «additionalEditPolicies(it)»
'''
+ def additionalEditPolicies(GenExternalNodeLabel it) ''''''
+
def getBorderItemLocator(GenExternalNodeLabel it) '''
«generatedMemberComment»
public org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator getBorderItemLocator() {
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/LinkEditPart.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/LinkEditPart.xtend
index 283c2ff17..e3f8da47b 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/LinkEditPart.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/LinkEditPart.xtend
@@ -57,10 +57,13 @@ import xpt.Common_qvto import org.eclipse.gmf.gmfgraph.DiagramLabel
«xptEditpartsCommon.installSemanticEditPolicy(it)»
«installGraphicalNodeEditPolicy(it)»
«xptEditpartsCommon.behaviour(it)»
+ «additionalEditPolicies(it)»
'''
def installGraphicalNodeEditPolicy(GenLink it) ''''''
+ def additionalEditPolicies(GenLink it) ''''''
+
/**
* FIXME: [MG] check counterpart for ModeledViewmap,
*/
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/LinkLabelEditPart.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/LinkLabelEditPart.xtend
index 5ca7dee7b..5f136340a 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/LinkLabelEditPart.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/LinkLabelEditPart.xtend
@@ -54,8 +54,12 @@ import xpt.diagram.editpolicies.TextSelectionEditPolicy
installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new «linkLabelDragPolicyQualifiedClassName(
it.getDiagram())»());
«xptEditpartsCommon.behaviour(it)»
+ «additionalEditPolicies(it)»
'''
+
+ def additionalEditPolicies(GenLinkLabel it) ''''''
+
def getKeyPoint(GenLinkLabel it) '''
«generatedMemberComment»
public int getKeyPoint() {
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/NodeEditPart.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/NodeEditPart.xtend
index 820ac6adf..820fe319e 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/NodeEditPart.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/NodeEditPart.xtend
@@ -86,8 +86,11 @@ import xpt.diagram.editparts.EditPartFactory
«xptEditpartsCommon.behaviour(it)»
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ «additionalEditPolicies(it)»
'''
+ def additionalEditPolicies(GenNode it) ''''''
+
def installGraphicalNodeEditPolicy(GenNode it) '''
«IF needsGraphicalNodeEditPolicy(it)»
installEditPolicy(org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE, new «graphicalEditPolicy.qualifiedClassName(it)»());
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/NodeLabelEditPart.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/NodeLabelEditPart.xtend
index 406b6a05c..50fd9a2e6 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/NodeLabelEditPart.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/impl/diagram/editparts/NodeLabelEditPart.xtend
@@ -45,8 +45,12 @@ import xpt.diagram.editpolicies.TextSelectionEditPolicy
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new «nodeLabelDragPolicyQualifiedClassName(it.diagram)»());
«xptEditpartsCommon.behaviour(it)»
+ «additionalEditPolicies(it)»
'''
+
+ def additionalEditPolicies(GenNodeLabel it) ''''''
+
def refreshBounds(GenNodeLabel it) '''
«IF isStoringChildPositions(it.node)»
«generatedMemberComment»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ChildNodeLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ChildNodeLabelEditPart.xpt
index d08e4a724..ce3d7d1c4 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ChildNodeLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ChildNodeLabelEditPart.xpt
@@ -33,8 +33,10 @@
installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new «getDiagram().getTextNonResizableEditPolicyQualifiedClassName()»());
installEditPolicy(org.eclipse.gef.EditPolicy.COMPONENT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy());
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
- «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+ «EXPAND additionalEditPolicies-»
«ENDDEFINE»
+
+«DEFINE additionalEditPolicies FOR gmfgen::GenChildLabelNode»«ENDDEFINE»
«DEFINE handleNotificationEventBody FOR gmfgen::GenChildLabelNode-»
Object feature = event.getFeature();
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/CompartmentEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/CompartmentEditPart.xpt
index b4dae4636..9e8da5022 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/CompartmentEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/CompartmentEditPart.xpt
@@ -61,8 +61,12 @@
«ENDIF-»
«EXPAND xpt::diagram::editparts::Common::installCanonicalEditPolicy-»
«EXPAND xpt::diagram::editparts::Common::behaviour-»
+ «EXPAND additionalEditPolicies-»
«ENDDEFINE»
+
+«DEFINE additionalEditPolicies FOR gmfgen::GenCompartment»«ENDDEFINE»
+
«DEFINE refreshVisuals FOR gmfgen::GenCompartment-»
«IF isStoringChildPositions(node)-»
«EXPAND xpt::Common::generatedMemberComment»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/DiagramEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/DiagramEditPart.xpt
index 134927356..f9cf4b470 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/DiagramEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/DiagramEditPart.xpt
@@ -27,6 +27,17 @@
«EXPAND xpt::diagram::editparts::Common::installCanonicalEditPolicy-»
«EXPAND xpt::diagram::editparts::Common::installCreationEditPolicy-»
«IF generateCreateShortcutAction() and null = editorGen.application-»
+ «EXPAND dragDropEditPolicy-»
+ «ENDIF-»
+ «IF shouldGenerateDiagramViewmap(self)-»
+ «EXPAND layotEditPolicy-»
+ «ENDIF-»
+ «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
+ «EXPAND additionalEditPolicies-»
+«ENDDEFINE»
+
+ «DEFINE dragDropEditPolicy FOR gmfgen::GenDiagram-»
installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragDropEditPolicy() {
public org.eclipse.gef.commands.Command getDropObjectsCommand(org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest dropRequest) {
«EXPAND CodeStyle::newGenericInstance('viewDescriptors', 'java.util.ArrayList', 'org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor')»();
@@ -48,8 +59,9 @@
return null;
}
});
- «ENDIF-»
- «IF shouldGenerateDiagramViewmap(self)-»
+ «ENDDEFINE»
+
+ «DEFINE layotEditPolicy FOR gmfgen::GenDiagram-»
// diagram figure does layout; need to install child editpolicy to show selection feedback
installEditPolicy(org.eclipse.gef.EditPolicy.LAYOUT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
protected org.eclipse.gef.EditPolicy createChildEditPolicy(org.eclipse.gef.EditPart child) {
@@ -64,10 +76,9 @@
return null;
}
});
- «ENDIF-»
- «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
-«ENDDEFINE»
+ «ENDDEFINE»
+
+ «DEFINE additionalEditPolicies FOR gmfgen::GenDiagram»«ENDDEFINE»
«DEFINE createFigure FOR gmfgen::GenDiagram-»
«IF shouldGenerateDiagramViewmap(self)-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ExternalNodeLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ExternalNodeLabelEditPart.xpt
index 4765a8fb2..ea07de585 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ExternalNodeLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ExternalNodeLabelEditPart.xpt
@@ -32,8 +32,11 @@
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
installEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE, new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»());
«EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+ «EXPAND additionalEditPolicies-»
«ENDDEFINE»
+«DEFINE additionalEditPolicies FOR gmfgen::GenExternalNodeLabel»«ENDDEFINE»
+
«DEFINE getBorderItemLocator FOR gmfgen::GenExternalNodeLabel-»
«EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator getBorderItemLocator() {
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkEditPart.xpt
index 32726fd0e..0618a7705 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkEditPart.xpt
@@ -29,11 +29,14 @@
«EXPAND xpt::diagram::editparts::Common::installSemanticEditPolicy-»
«EXPAND installGraphicalNodeEditPolicy-»
«EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+ «EXPAND additionalEditPolicies-»
«ENDDEFINE»
«DEFINE installGraphicalNodeEditPolicy FOR gmfgen::GenLink-»
«ENDDEFINE»
+«DEFINE additionalEditPolicies FOR gmfgen::GenLink»«ENDDEFINE»
+
«DEFINE addFixedChild FOR gmfgen::GenLink-»
«IF labels->notEmpty() and (labels->exists(l | l.viewmap.oclIsKindOf(gmfgen::ParentAssignedViewmap))
or labels->exists(l | l.viewmap.oclIsKindOf(gmfgen::ModeledViewmap))) -»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkLabelEditPart.xpt
index a743ea795..0e1ae8215 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkLabelEditPart.xpt
@@ -35,8 +35,11 @@
installEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE, new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»());
installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new «EXPAND linkLabelDragPolicyQualifiedClassName FOR self.getDiagram()»());
«EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+ «EXPAND additionalEditPolicies-»
«ENDDEFINE»
+«DEFINE additionalEditPolicies FOR gmfgen::GenLinkLabel»«ENDDEFINE»
+
«DEFINE getKeyPoint FOR gmfgen::GenLinkLabel-»
«EXPAND xpt::Common::generatedMemberComment»
public int getKeyPoint() {
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt
index a24564ad7..bcc187f77 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt
@@ -34,7 +34,7 @@
«ENDDEFINE»
«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenNode-»
- «EXPAND installCreationRolePolicy-»
+«EXPAND installCreationRolePolicy-»
super.createDefaultEditPolicies();
«EXPAND installPrimaryDragEditPolicy-»
«EXPAND xpt::diagram::editparts::Common::installSemanticEditPolicy-»
@@ -47,8 +47,11 @@
«EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ «EXPAND additionalEditPolicies-»
«ENDDEFINE»
+«DEFINE additionalEditPolicies FOR gmfgen::GenNode»«ENDDEFINE»
+
«DEFINE installGraphicalNodeEditPolicy FOR gmfgen::GenNode-»
«IF needsGraphicalNodeEditPolicy(self)-»
installEditPolicy(org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE, new «getGraphicalNodeEditPolicyQualifiedClassName()»());
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt
index db209ba35..7b7869f51 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt
@@ -27,8 +27,11 @@
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new «EXPAND nodeLabelDragPolicyQualifiedClassName FOR self.getDiagram()»());
«EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+ «EXPAND additionalEditPolicies-»
«ENDDEFINE»
+«DEFINE additionalEditPolicies FOR gmfgen::GenNodeLabel»«ENDDEFINE»
+
«DEFINE refreshBounds FOR gmfgen::GenNodeLabel-»
«IF isStoringChildPositions(node)-»
«EXPAND xpt::Common::generatedMemberComment»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt
index fe6793d5d..178b95056 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt
@@ -36,7 +36,7 @@
«DEFINE behaviour FOR gmfgen::OpenDiagramBehaviour-»
installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE,
- new «getEditPolicyQualifiedClassName()»());
+ new «getEditPolicyQualifiedClassName()»());«-»
«ENDDEFINE»
«DEFINE labelFigure FOR gmfgen::ParentAssignedViewmap-»

Back to the top