diff options
Diffstat (limited to 'plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt')
-rw-r--r-- | plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt b/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt deleted file mode 100644 index 61cec8a41fb..00000000000 --- a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt +++ /dev/null @@ -1,70 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2006, 2020 Borland Software Corporation, CEA LIST, Artal - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Dmitry Stadnik (Borland) - initial API and implementation - * Alexander Shatalin (Borland) - initial API and implementation - * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174 - *****************************************************************************/ - -«IMPORT 'http://www.eclipse.org/papyrus/gmf/2020/GenModel'» -«EXTENSION xpt::diagram::editparts::Utils» - -«DEFINE _constructor FOR gmfgen::GenNodeLabel-» - «EXPAND xpt::Common::generatedMemberComment» - public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) { - super(view); - } -«ENDDEFINE» - -«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenNodeLabel-» - super.createDefaultEditPolicies(); - installEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE, new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»()); - 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» - protected void refreshBounds() { - int width = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Width())).intValue(); - int height = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Height())).intValue(); - org.eclipse.draw2d.geometry.Dimension size = new org.eclipse.draw2d.geometry.Dimension(width, height); - int x = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_X())).intValue(); - int y = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_Y())).intValue(); - org.eclipse.draw2d.geometry.Point loc = new org.eclipse.draw2d.geometry.Point(x, y); - ((org.eclipse.gef.GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), new org.eclipse.draw2d.geometry.Rectangle(loc, size)); - } - «ENDIF-» -«ENDDEFINE» - -«DEFINE handleNotificationEventBody FOR gmfgen::GenNodeLabel-» - Object feature = event.getFeature(); - «IF isStoringChildPositions(node)-» - «EXPAND xpt::diagram::editparts::Common::handleBounds FOR self-» - «ENDIF-» - «EXPAND xpt::diagram::editparts::Common::handleText FOR self-» - super.handleNotificationEvent(event); -«ENDDEFINE» - -«REM»since 3.1, old generated NodeLabelDragPolicy extracted to GMFT-runtime, -see org.eclipse.gmf.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy. -The next 2 DEFINE's are left here as a hook for backward compatibility with possible AROUND's -«ENDREM» -«DEFINE nodeLabelDragPolicyQualifiedClassName FOR gmfgen::GenDiagram»org.eclipse.gmf.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy«ENDDEFINE» - -«DEFINE nodeLabelDragPolicyClass FOR gmfgen::GenDiagram-» -«REM»not generated by default anymore«ENDREM»«-» -«ENDDEFINE» |