Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ChildNodeLabelEditPart.xtend86
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/CompartmentEditPart.xtend174
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/DiagramEditPart.xtend56
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkEditPart.xtend60
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/NodeEditPart.xtend222
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/NodeLabelEditPart.xtend14
6 files changed, 306 insertions, 306 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ChildNodeLabelEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ChildNodeLabelEditPart.xtend
index 1bedd0232ec..cd724aac1d1 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ChildNodeLabelEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ChildNodeLabelEditPart.xtend
@@ -1,43 +1,43 @@
-/**
- * Copyright (c) 2006, 2009, 2013 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
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- * Alexander Shatalin (Borland) - initial API and implementation
- * Michael Golubev (Montages) - #386838 - migrate to Xtend2
- */
-package aspects.diagram.editparts
-
-import com.google.inject.Singleton
-import org.eclipse.gmf.codegen.gmfgen.GenChildLabelNode
-import org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView
-
-@Singleton class ChildNodeLabelEditPart extends diagram.editparts.ChildNodeLabelEditPart {
-
-
-
- override extendsList(GenChildLabelNode it) '''
-«««BEGIN: PapyrusGenCode
-«««Add own extension
-«IF it.eResource.allContents.filter(typeof (ExtendedGenView)).filter[v |v.genView.contains(it) && v.superOwnedEditPart!=null].size != 0»
-extends «FOR extendedObject : it.eResource.allContents.filter(typeof (ExtendedGenView)).filter[v |v.genView.contains(it) && v.superOwnedEditPart!=null].toIterable»
-«specifyInheritance(extendedObject as ExtendedGenView)»
-«ENDFOR»
-«««END: PapyrusGenCode
-«ELSE»
- extends org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart
-«ENDIF»
-'''
-
-//BEGIN: PapyrusGenCode
-//definition of the inheritance
-def specifyInheritance (ExtendedGenView it)'''«superOwnedEditPart»'''
-//END: PapyrusGenCode
-
-override implementsList(GenChildLabelNode it) '''implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart, org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart, org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit'''
-}
+/**
+ * Copyright (c) 2006, 2009, 2013 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ * Alexander Shatalin (Borland) - initial API and implementation
+ * Michael Golubev (Montages) - #386838 - migrate to Xtend2
+ */
+package aspects.diagram.editparts
+
+import com.google.inject.Singleton
+import org.eclipse.gmf.codegen.gmfgen.GenChildLabelNode
+import org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView
+
+@Singleton class ChildNodeLabelEditPart extends diagram.editparts.ChildNodeLabelEditPart {
+
+
+
+ override extendsList(GenChildLabelNode it) '''
+«««BEGIN: PapyrusGenCode
+«««Add own extension
+«IF it.eResource.allContents.filter(typeof (ExtendedGenView)).filter[v |v.genView.contains(it) && v.superOwnedEditPart!=null].size != 0»
+extends «FOR extendedObject : it.eResource.allContents.filter(typeof (ExtendedGenView)).filter[v |v.genView.contains(it) && v.superOwnedEditPart!=null].toIterable»
+«specifyInheritance(extendedObject as ExtendedGenView)»
+«ENDFOR»
+«««END: PapyrusGenCode
+«ELSE»
+ extends org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart
+«ENDIF»
+'''
+
+//BEGIN: PapyrusGenCode
+//definition of the inheritance
+def specifyInheritance (ExtendedGenView it)'''«superOwnedEditPart»'''
+//END: PapyrusGenCode
+
+override implementsList(GenChildLabelNode it) '''implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart, org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart, org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit'''
+}
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/CompartmentEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/CompartmentEditPart.xtend
index 7795020066c..1afae6e2876 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/CompartmentEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/CompartmentEditPart.xtend
@@ -1,87 +1,87 @@
-/**
- * Copyright (c) 2006, 2009, 2013 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
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- * Alexander Shatalin (Borland) - initial API and implementation
- * Michael Golubev (Montages) - #386838 - migrate to Xtend2
- */
-package aspects.diagram.editparts
-
-import com.google.inject.Inject
-import com.google.inject.Singleton
-import org.eclipse.gmf.codegen.gmfgen.GenCompartment
-import org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView
-import xpt.Common
-
-@Singleton class CompartmentEditPart extends diagram.editparts.CompartmentEditPart {
- @Inject extension Common;
-
- override extendsList(GenCompartment it) '''
-
-«««BEGIN: PapyrusGenCode
-«««Add own extension
-«IF it.eResource.allContents.filter(typeof(ExtendedGenView)).filter[v|v.genView.contains(it) && v.superOwnedEditPart != null].size != 0»
- extends «FOR extendedObject : it.eResource.allContents.filter(typeof (ExtendedGenView)).filter[v|v.genView.contains(it) && v.superOwnedEditPart != null].toIterable»
- «specifyInheritance(extendedObject as ExtendedGenView)»
-«ENDFOR»
-«««END: BEGIN: PapyrusGenCode
-«ELSE»
- extends «IF listLayout»org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart«ELSE»org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.linklf.LinkLFShapeCompartmentEditPart«ENDIF»
-«ENDIF»
- '''
-
- //BEGIN: PapyrusGenCode
- //definition of the inheritance
- def specifyInheritance(ExtendedGenView it) '''«superOwnedEditPart»'''
-
- //END: PapyrusGenCode
- override additions(GenCompartment it) '''
- «handleSize(it)»
- «refreshbound(it)»
- «refreshvisual(it)»
- '''
-
- def handleSize(GenCompartment it) '''
- «generatedMemberComment»
-protected void handleNotificationEvent(org.eclipse.emf.common.notify.Notification notification) {
- Object feature = notification.getFeature();
- 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();
- }
- super.handleNotificationEvent(notification);
- }
-'''
-
- def refreshbound(GenCompartment it) '''
- «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));
- }
- '''
-
- def refreshvisual(GenCompartment it) '''
- «generatedMemberComment»
-protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-'''
-}
+/**
+ * Copyright (c) 2006, 2009, 2013 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ * Alexander Shatalin (Borland) - initial API and implementation
+ * Michael Golubev (Montages) - #386838 - migrate to Xtend2
+ */
+package aspects.diagram.editparts
+
+import com.google.inject.Inject
+import com.google.inject.Singleton
+import org.eclipse.gmf.codegen.gmfgen.GenCompartment
+import org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView
+import xpt.Common
+
+@Singleton class CompartmentEditPart extends diagram.editparts.CompartmentEditPart {
+ @Inject extension Common;
+
+ override extendsList(GenCompartment it) '''
+
+«««BEGIN: PapyrusGenCode
+«««Add own extension
+«IF it.eResource.allContents.filter(typeof(ExtendedGenView)).filter[v|v.genView.contains(it) && v.superOwnedEditPart != null].size != 0»
+ extends «FOR extendedObject : it.eResource.allContents.filter(typeof (ExtendedGenView)).filter[v|v.genView.contains(it) && v.superOwnedEditPart != null].toIterable»
+ «specifyInheritance(extendedObject as ExtendedGenView)»
+«ENDFOR»
+«««END: BEGIN: PapyrusGenCode
+«ELSE»
+ extends «IF listLayout»org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart«ELSE»org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.linklf.LinkLFShapeCompartmentEditPart«ENDIF»
+«ENDIF»
+ '''
+
+ //BEGIN: PapyrusGenCode
+ //definition of the inheritance
+ def specifyInheritance(ExtendedGenView it) '''«superOwnedEditPart»'''
+
+ //END: PapyrusGenCode
+ override additions(GenCompartment it) '''
+ «handleSize(it)»
+ «refreshbound(it)»
+ «refreshvisual(it)»
+ '''
+
+ def handleSize(GenCompartment it) '''
+ «generatedMemberComment»
+protected void handleNotificationEvent(org.eclipse.emf.common.notify.Notification notification) {
+ Object feature = notification.getFeature();
+ 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();
+ }
+ super.handleNotificationEvent(notification);
+ }
+'''
+
+ def refreshbound(GenCompartment it) '''
+ «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));
+ }
+ '''
+
+ def refreshvisual(GenCompartment it) '''
+ «generatedMemberComment»
+protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+'''
+}
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/DiagramEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/DiagramEditPart.xtend
index d8f7a8e2c3b..a6e7c02d13d 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/DiagramEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/DiagramEditPart.xtend
@@ -1,28 +1,28 @@
-/**
- * Copyright (c) 2006, 2010, 2013 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
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- * Alexander Shatalin (Borland) - initial API and implementation
- * Michael Golubev (Montages) - #386838 - migrate to Xtend2
- */
-package aspects.diagram.editparts
-
-import com.google.inject.Inject
-import com.google.inject.Singleton
-import org.eclipse.gmf.codegen.gmfgen.GenDiagram
-
-@Singleton class DiagramEditPart extends diagram.editparts.DiagramEditPart {
-
- @Inject aspects.impl.diagram.editparts.DiagramEditPart aspectDiagramEditPart;
-
- //BEGIN: PapyrusGenCode
- //patches the super type of the diagram edit part in case the controlled object represents a UML element
- override extendsList(GenDiagram it) '''extends «aspectDiagramEditPart.extendsListContents(it)»'''
- //END: PapyrusGenCode
-}
+/**
+ * Copyright (c) 2006, 2010, 2013 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ * Alexander Shatalin (Borland) - initial API and implementation
+ * Michael Golubev (Montages) - #386838 - migrate to Xtend2
+ */
+package aspects.diagram.editparts
+
+import com.google.inject.Inject
+import com.google.inject.Singleton
+import org.eclipse.gmf.codegen.gmfgen.GenDiagram
+
+@Singleton class DiagramEditPart extends diagram.editparts.DiagramEditPart {
+
+ @Inject aspects.impl.diagram.editparts.DiagramEditPart aspectDiagramEditPart;
+
+ //BEGIN: PapyrusGenCode
+ //patches the super type of the diagram edit part in case the controlled object represents a UML element
+ override extendsList(GenDiagram it) '''extends «aspectDiagramEditPart.extendsListContents(it)»'''
+ //END: PapyrusGenCode
+}
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkEditPart.xtend
index 173e2c4de0a..5875e8c2c64 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkEditPart.xtend
@@ -1,30 +1,30 @@
-/**
- * Copyright (c) 2006, 2009, 2013 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
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- * Alexander Shatalin (Borland) - initial API and implementation
- * Michael Golubev (Montages) - #386838 - migrate to Xtend2
- */
-package aspects.diagram.editparts
-
-import com.google.inject.Inject
-import com.google.inject.Singleton
-import org.eclipse.gmf.codegen.gmfgen.GenLink
-
-@Singleton class LinkEditPart extends diagram.editparts.LinkEditPart {
- @Inject aspects.impl.diagram.editparts.LinkEditPart aspectsLinkEditPart;
-
-
-
-//BEGIN: PapyrusGenCode
-//patches the super type of the link edit part in case the controlled object represents a UML element
-override extendsList(GenLink it) '''extends «aspectsLinkEditPart.extendsListContents(it)»'''
-//END: PapyrusGenCode
-
-}
+/**
+ * Copyright (c) 2006, 2009, 2013 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ * Alexander Shatalin (Borland) - initial API and implementation
+ * Michael Golubev (Montages) - #386838 - migrate to Xtend2
+ */
+package aspects.diagram.editparts
+
+import com.google.inject.Inject
+import com.google.inject.Singleton
+import org.eclipse.gmf.codegen.gmfgen.GenLink
+
+@Singleton class LinkEditPart extends diagram.editparts.LinkEditPart {
+ @Inject aspects.impl.diagram.editparts.LinkEditPart aspectsLinkEditPart;
+
+
+
+//BEGIN: PapyrusGenCode
+//patches the super type of the link edit part in case the controlled object represents a UML element
+override extendsList(GenLink it) '''extends «aspectsLinkEditPart.extendsListContents(it)»'''
+//END: PapyrusGenCode
+
+}
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/NodeEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/NodeEditPart.xtend
index 05fa1024b41..d79b500c2ae 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/NodeEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/NodeEditPart.xtend
@@ -1,112 +1,112 @@
-/**
- * Copyright (c) 2006, 2009, 2013 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
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- * Alexander Shatalin (Borland) - initial API and implementation
- * Michael Golubev (Montages) - #386838 - migrate to Xtend2
- */
-package aspects.diagram.editparts
-
-import com.google.inject.Inject
-import com.google.inject.Singleton
-import org.eclipse.gmf.codegen.gmfgen.GenNode
-import xpt.Common
-import xpt.diagram.editparts.Utils_qvto
-
-//DOCUMENTATION: PapyrusGenCode
-//add call template in order to generate handlenotification in order to refresh figure by taking account event
-
-@Singleton class NodeEditPart extends diagram.editparts.NodeEditPart {
- @Inject extension Common;
- @Inject extension Utils_qvto;
-
- @Inject impl.diagram.editparts.NodeEditPart xptNodeEditPartImpl;
- @Inject aspects.impl.diagram.editparts.NodeEditPart aspectsNodeEditPartImpl;
-
-
-
- override Main(GenNode it) '''
- «copyright(diagram.editorGen)»
- package «xptNodeEditPartImpl.packageName(it)»;
-
- «generatedClassComment»
- public class «xptNodeEditPartImpl.className(it)» «extendsList(it)» «implementsList(it)» {
-
- «attributes(it)»
-
- «xptNodeEditPartImpl.constructor(it)»
-
- «createDefaultEditPolicies(it)»
-
- «xptNodeEditPartImpl.createLayoutEditPolicy(it)»
-
-««« BEGIN: PapyrusGenCode
-««« call tamplate to paste code for refresh figure by taking account event
- «aspectsNodeEditPartImpl.specificHandleNotificationEvent(it)»
-««« END: PapyrusGenCode
-
- «xptNodeEditPartImpl.createNodeShape(it.viewmap, it)»
-
- «IF hasFixedChildren(it)»
- «xptNodeEditPartImpl.addFixedChild(it)»
-
- «xptNodeEditPartImpl.removeFixedChild(it)»
-
- «xptNodeEditPartImpl.addChildVisual(it)»
-
- «xptNodeEditPartImpl.removeChildVisual(it)»
-
- «xptNodeEditPartImpl.getContentPaneFor(it)»
- «ENDIF»
-
- «xptNodeEditPartImpl.addBorderItem(it)»
-
- «xptNodeEditPartImpl.createNodePlate(it)»
-
- «xptNodeEditPartImpl.getPrimaryDragEditPolicy(it)»
-
- «xptNodeEditPartImpl.createFigure(it)»
-
- «xptNodeEditPartImpl.setupContentPane(it)»
-
- «xptNodeEditPartImpl.getContentPane(it)»
-
- «xptNodeEditPartImpl.setForegroundColor(it)»
-
-««« «xptNodeEditPartImpl.setBackgroundColor(it)»
-
- «xptNodeEditPartImpl.setLineWidth(it)»
-
- «xptNodeEditPartImpl.setLineStyle(it)»
-
- «xptNodeEditPartImpl.getPrimaryChildEditPart(it)»
-
-
-
- «IF hasChildrenInListCompartments(it)»
- «xptNodeEditPartImpl.getTargetEditPartMethod(it)»
- «ENDIF»
-
- «handleNotificationEvent(it)»
-
- «xptNodeEditPartImpl.innerClassDeclaration(viewmap)»
-
- «additions(it)»
- }
- '''
-
- //BEGIN: PapyrusGenCode
- //patches the super type of the node edit part in case the controlled object represents a UML element
- override extendsList (GenNode it)''' extends «aspectsNodeEditPartImpl.extendsListContents(it)»'''
- //END: PapyrusGenCode
-
- // override additions(GenNode it) '''
- // «aspectsNodeEditPartImpl.genPreferredValue(it)»
- // '''
+/**
+ * Copyright (c) 2006, 2009, 2013 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ * Alexander Shatalin (Borland) - initial API and implementation
+ * Michael Golubev (Montages) - #386838 - migrate to Xtend2
+ */
+package aspects.diagram.editparts
+
+import com.google.inject.Inject
+import com.google.inject.Singleton
+import org.eclipse.gmf.codegen.gmfgen.GenNode
+import xpt.Common
+import xpt.diagram.editparts.Utils_qvto
+
+//DOCUMENTATION: PapyrusGenCode
+//add call template in order to generate handlenotification in order to refresh figure by taking account event
+
+@Singleton class NodeEditPart extends diagram.editparts.NodeEditPart {
+ @Inject extension Common;
+ @Inject extension Utils_qvto;
+
+ @Inject impl.diagram.editparts.NodeEditPart xptNodeEditPartImpl;
+ @Inject aspects.impl.diagram.editparts.NodeEditPart aspectsNodeEditPartImpl;
+
+
+
+ override Main(GenNode it) '''
+ «copyright(diagram.editorGen)»
+ package «xptNodeEditPartImpl.packageName(it)»;
+
+ «generatedClassComment»
+ public class «xptNodeEditPartImpl.className(it)» «extendsList(it)» «implementsList(it)» {
+
+ «attributes(it)»
+
+ «xptNodeEditPartImpl.constructor(it)»
+
+ «createDefaultEditPolicies(it)»
+
+ «xptNodeEditPartImpl.createLayoutEditPolicy(it)»
+
+««« BEGIN: PapyrusGenCode
+««« call tamplate to paste code for refresh figure by taking account event
+ «aspectsNodeEditPartImpl.specificHandleNotificationEvent(it)»
+««« END: PapyrusGenCode
+
+ «xptNodeEditPartImpl.createNodeShape(it.viewmap, it)»
+
+ «IF hasFixedChildren(it)»
+ «xptNodeEditPartImpl.addFixedChild(it)»
+
+ «xptNodeEditPartImpl.removeFixedChild(it)»
+
+ «xptNodeEditPartImpl.addChildVisual(it)»
+
+ «xptNodeEditPartImpl.removeChildVisual(it)»
+
+ «xptNodeEditPartImpl.getContentPaneFor(it)»
+ «ENDIF»
+
+ «xptNodeEditPartImpl.addBorderItem(it)»
+
+ «xptNodeEditPartImpl.createNodePlate(it)»
+
+ «xptNodeEditPartImpl.getPrimaryDragEditPolicy(it)»
+
+ «xptNodeEditPartImpl.createFigure(it)»
+
+ «xptNodeEditPartImpl.setupContentPane(it)»
+
+ «xptNodeEditPartImpl.getContentPane(it)»
+
+ «xptNodeEditPartImpl.setForegroundColor(it)»
+
+««« «xptNodeEditPartImpl.setBackgroundColor(it)»
+
+ «xptNodeEditPartImpl.setLineWidth(it)»
+
+ «xptNodeEditPartImpl.setLineStyle(it)»
+
+ «xptNodeEditPartImpl.getPrimaryChildEditPart(it)»
+
+
+
+ «IF hasChildrenInListCompartments(it)»
+ «xptNodeEditPartImpl.getTargetEditPartMethod(it)»
+ «ENDIF»
+
+ «handleNotificationEvent(it)»
+
+ «xptNodeEditPartImpl.innerClassDeclaration(viewmap)»
+
+ «additions(it)»
+ }
+ '''
+
+ //BEGIN: PapyrusGenCode
+ //patches the super type of the node edit part in case the controlled object represents a UML element
+ override extendsList (GenNode it)''' extends «aspectsNodeEditPartImpl.extendsListContents(it)»'''
+ //END: PapyrusGenCode
+
+ // override additions(GenNode it) '''
+ // «aspectsNodeEditPartImpl.genPreferredValue(it)»
+ // '''
} \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/NodeLabelEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/NodeLabelEditPart.xtend
index 0c009a414db..effa52d178c 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/NodeLabelEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/NodeLabelEditPart.xtend
@@ -11,13 +11,13 @@
* Alexander Shatalin (Borland) - initial API and implementation
* Michael Golubev (Montages) - #386838 - migrate to Xtend2
*/
-package aspects.diagram.editparts
-
-import com.google.inject.Inject
-import com.google.inject.Singleton
-import org.eclipse.gmf.codegen.gmfgen.GenNodeLabel
-import xpt.Common
-
+package aspects.diagram.editparts
+
+import com.google.inject.Inject
+import com.google.inject.Singleton
+import org.eclipse.gmf.codegen.gmfgen.GenNodeLabel
+import xpt.Common
+
//DOCUMENTATION: PapyrusGenCode
//add in the addition codes in order to refresh the labels
@Singleton class NodeLabelEditPart extends diagram.editparts.NodeLabelEditPart {

Back to the top