Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/xpt/diagram/editparts/Common.xpt')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/xpt/diagram/editparts/Common.xpt175
1 files changed, 0 insertions, 175 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/xpt/diagram/editparts/Common.xpt b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/xpt/diagram/editparts/Common.xpt
deleted file mode 100644
index 41548d13845..00000000000
--- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/aspects/xpt/diagram/editparts/Common.xpt
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 2006, 2009 Borland Software Corporation
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- * modified by Patrick Tessier (CEA LIST)
- */
-
-«REM»Documentation: PapyrusGenCode«ENDREM»
-«REM»This template has been modified in order to remove canonical ediPolicies«ENDREM»
-
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::StringOperations»
-«EXTENSION xpt::editor::Utils»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION xpt::diagram::editpolicies::LinkUtils»
-«EXTENSION xpt::expressions::ValueExpression»
-
-
-«DEFINE visualIDConstant FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
- public static final int VISUAL_ID = «visualID»;
-«ENDDEFINE»
-
-«DEFINE behaviour FOR gmfgen::GenCommonBase-»
- «EXPAND behaviour FOREACH behaviour-»
-«ENDDEFINE»
-
-«DEFINE behaviour FOR gmfgen::Behaviour-»
-«ENDDEFINE»
-
-«DEFINE behaviour FOR gmfgen::CustomBehaviour-»
-«IF editPolicyQualifiedClassName = null or editPolicyQualifiedClassName.trim().length() = 0-»
- removeEditPolicy(«key»); «IF key.startsWith('\"') and key.xpandEndsWith('\"')»«EXPAND xpt::Common::nonNLS»«ENDIF»
-«ELSE-»
- installEditPolicy(«key», new «getEditPolicyQualifiedClassName()»()); «IF key.startsWith('\"') and key.endsWith('\"')»«EXPAND xpt::Common::nonNLS»«ENDIF»
-«ENDIF-»
-«ENDDEFINE»
-
-«DEFINE behaviour FOR gmfgen::OpenDiagramBehaviour-»
- installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE,
- new «getEditPolicyQualifiedClassName()»());
-«ENDDEFINE»
-
-«DEFINE labelFigure FOR gmfgen::ParentAssignedViewmap-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected org.eclipse.draw2d.IFigure createFigure() {
- // Parent should assign one using «EXPAND impl::diagram::editparts::TextAware::labelSetterName»() method
- return null;
- }
-«ENDDEFINE»
-
-«DEFINE labelFigure FOR gmfgen::Viewmap-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected org.eclipse.draw2d.IFigure createFigure() {
- org.eclipse.draw2d.IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- «EXPAND xpt::Common::generatedMemberComment»
- protected org.eclipse.draw2d.IFigure createFigurePrim() {
- «EXPAND labelFigurePrim FOR self-»
-«ENDDEFINE»
-
-«DEFINE labelFigurePrim FOR gmfgen::FigureViewmap-»
-«IF figureQualifiedClassName = null-»
- return new org.eclipse.draw2d.Label();
-«ELSE-»
- return new «figureQualifiedClassName»();
-«ENDIF-»
- }
-«ENDDEFINE»
-
-«DEFINE labelFigurePrim FOR gmfgen::SnippetViewmap-»
- return «body»;
- }
-«ENDDEFINE»
-
-«DEFINE labelFigurePrim FOR gmfgen::InnerClassViewmap-»
- return new «className»();
- }
-
- «classBody»
-«ENDDEFINE»
-
-«DEFINE labelFigurePrim FOR gmfgen::Viewmap-»
- «ERROR 'Unknown viewmap: ' + self.repr()-»
- }
-«ENDDEFINE»
-
-«DEFINE notationalListeners FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); «EXPAND xpt::Common::nonNLS»
- }
-
- «EXPAND xpt::Common::generatedMemberComment»
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); «EXPAND xpt::Common::nonNLS»
- }
-«ENDDEFINE»
-
-«DEFINE handleBounds FOR gmfgen::GenCommonBase-»
- if (org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Width().equals(feature) ||
- org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Height().equals(feature) ||
- org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_X().equals(feature) ||
- org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
- refreshBounds();
- }
-«ENDDEFINE»
-
-«DEFINE handleText FOR gmfgen::GenCommonBase-»
- if (org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer) event.getNewValue();
- setFontColor(org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry.getInstance().getColor(c));
- } else if (org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if (org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if (org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if (getParser() instanceof org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser) {
- org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser modelParser =
- (org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser) getParser();
- if (modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if (resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
-«ENDDEFINE»
-
-«DEFINE installSemanticEditPolicy FOR gmfgen::GenCommonBase-»
- «IF sansDomain-»
-removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE);
- «ELSE-»
-installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE, new «getItemSemanticEditPolicyQualifiedClassName()»());
- «ENDIF-»
-«ENDDEFINE»
-
-«DEFINE installCanonicalEditPolicy FOR gmfgen::GenContainerBase-»
- «IF needsCanonicalEditPolicy()-»
- «REM»BEGIN: PapyrusGenCode«ENDREM»
- «REM»Used to remove at each time canonical editpolicies«ENDREM»
-//in Papyrus diagrams are not strongly synchronised
-//installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new «getCanonicalEditPolicyQualifiedClassName()»());
- «REM»END: PapyrusGenCode«ENDREM»
- «ENDIF-»
-«ENDDEFINE»
-
-«DEFINE installCreationEditPolicy FOR gmfgen::GenCommonBase-»
-installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE, «EXPAND _creationEditPolicyNewInstance»);
-«ENDDEFINE»
-«DEFINE _creationEditPolicyNewInstance FOR gmfgen::GenCommonBase-»
-new org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy()«-»
-«ENDDEFINE» \ No newline at end of file

Back to the top