Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2014-12-11 15:05:11 +0000
committerMickael ADAM2014-12-11 15:05:11 +0000
commit819225bc9d115e1a40fcc106654fcd6088183dce (patch)
tree1033186a36a93c9378b60c99631313fb0dbdde9a /plugins/developer/org.eclipse.papyrus.def
parentde200440d37c73fc25545afe4a3d77d674013eda (diff)
parent85785b7900e513a0d47ba435349a613f5f8d1ad0 (diff)
downloadorg.eclipse.papyrus-819225bc9d115e1a40fcc106654fcd6088183dce.tar.gz
org.eclipse.papyrus-819225bc9d115e1a40fcc106654fcd6088183dce.tar.xz
org.eclipse.papyrus-819225bc9d115e1a40fcc106654fcd6088183dce.zip
Merge branch master into shape branch.
Conflicts: plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAbstractionEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAssociationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeDependencyEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeGeneralizationSetLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeInterfaceRealizationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageImportEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageMergeEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeRealizationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeSubstitutionEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeTemplateBindingEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeUsageEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotyperGeneralizationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchMutliplicityEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchRoleEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleSourceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleTargetEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicitySourceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicityTargetEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationSourceNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationTargetNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/BindingSubstitutionEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkAppliedStereotypeEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportAliasEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowAppliedStereotypeEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowConveyedLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceRealizationNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RealizationNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SourceISLinkLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SubstitutionNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TargetISLinkLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/policies/CustomGraphicalNodeEditPolicy.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml Change-Id: I723e9c8e78ca10425c684128686da2f30327dc11 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.def')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/impl/diagram/editparts/.gitignore1
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkLabelEditPart.xtend37
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend32
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/LinkLabelEditPart.xtend5
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend26
5 files changed, 80 insertions, 21 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/impl/diagram/editparts/.gitignore b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/impl/diagram/editparts/.gitignore
index 37f57489b1b..34f20c26406 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/impl/diagram/editparts/.gitignore
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/impl/diagram/editparts/.gitignore
@@ -7,3 +7,4 @@
/LinkEditPart.java
/LinkLabelEditPart.java
/NodeLabelEditPart.java
+/ExternalNodeLabelEditPart.java
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkLabelEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkLabelEditPart.xtend
index 03513d7a8c8..7dcf4beeee4 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkLabelEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkLabelEditPart.xtend
@@ -19,6 +19,7 @@ import org.eclipse.gmf.codegen.gmfgen.GenLinkLabel
import org.eclipse.papyrus.papyrusgmfgenextension.LabelVisibilityPreference
import xpt.Common
import org.eclipse.gmf.codegen.gmfgen.CustomBehaviour
+import org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView
@Singleton class LinkLabelEditPart extends diagram.editparts.LinkLabelEditPart{
@Inject extension Common;
@@ -50,25 +51,21 @@ import org.eclipse.gmf.codegen.gmfgen.CustomBehaviour
««« END: PapyrusGenCode
'''
- override extendsList(GenLinkLabel it) '''extends org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart'''
-
- override createDefaultEditPolicies(GenLinkLabel it) '''
- /**
- * @generated Papyrus Generation
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new «diagram.getTextSelectionEditPolicyQualifiedClassName()»());
- ««« BEGIN: PapyrusGenCode
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy());
- ««« END: PapyrusGenCode
- ««« Get the added custom behavoir
- «FOR CustomBehaviour:it.behaviour.filter(typeof (CustomBehaviour))»
- installEditPolicy(«CustomBehaviour.key», new «CustomBehaviour.editPolicyQualifiedClassName»());
- «ENDFOR»
- }
+// override extendsList(GenLinkLabel it) '''extends org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart'''
+
+ override extendsList(GenLinkLabel it) '''
+ «««BEGIN: PapyrusGenCode
+ «««specify a java super class for external nodes
+ «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»
+ «extendedObject.superOwnedEditPart»
+ «ENDFOR»
+ «««END: PapyrusGenCode
+ «ELSE»
+ extends org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart
+ «ENDIF»
'''
-
+
+
+
}
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend
new file mode 100644
index 00000000000..2a80b048294
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package aspects.impl.diagram.editparts
+
+import xpt.diagram.editparts.Common
+import org.eclipse.gmf.codegen.gmfgen.GenExternalNodeLabel
+import com.google.inject.Inject
+
+/**
+ * @author Mickael ADAM
+ *
+ */
+class ExternalNodeLabelEditPart extends impl.diagram.editparts.ExternalNodeLabelEditPart {
+
+ override additionalEditPolicies(GenExternalNodeLabel it){
+ '''
+ installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy());
+ '''
+ }
+
+} \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/LinkLabelEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/LinkLabelEditPart.xtend
index 80c54cde444..1175194be6e 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/LinkLabelEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/LinkLabelEditPart.xtend
@@ -38,5 +38,10 @@ import xpt.diagram.editparts.Common
««« End Papyrus Code
super.handleNotificationEvent(event);
'''
+
+ override additionalEditPolicies(GenLinkLabel it)
+ '''
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy());
+ '''
}
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend
index 8c84ea36d0d..f6ab147f25e 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend
@@ -35,6 +35,8 @@ import xpt.diagram.editparts.EditPartFactory
import xpt.diagram.editparts.Utils_qvto
import xpt.diagram.editpolicies.TextSelectionEditPolicy
import xpt.CodeStyle
+import xpt.diagram.ViewmapAttributesUtils_qvto
+import org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate
@Singleton class NodeEditPart extends impl.diagram.editparts.NodeEditPart {
@Inject extension Common;
@@ -43,8 +45,10 @@ import xpt.CodeStyle
@Inject extension EditPartsUtils_qvto;
@Inject extension VisualIDRegistry;
- @Inject extension Utils_qvto;
+ @Inject extension ViewmapAttributesUtils_qvto;
+ @Inject extension Utils_qvto;
+ @Inject extension xpt.diagram.Utils_qvto;
@Inject EditPartFactory xptEditPartFactory;
@Inject impl.diagram.editparts.TextAware xptTextAware;
@@ -177,6 +181,26 @@ override addFixedChild (GenNode it)'''
// }
// '''
+ override createNodePlate(GenNode it) '''
+ «IF it.eResource.allContents.filter(typeof(SpecificNodePlate)).filter[v |v.editParts.contains(it) && v.nodePlateQualifiedName!=null].size != 0»
+ «val editPart = it.eResource.allContents.filter(typeof(SpecificNodePlate)).filter[v |v.editParts.contains(it) && v.nodePlateQualifiedName!=null].head»
+ protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
+ «editPart.nodePlateQualifiedName» result = new «editPart.nodePlateQualifiedName»(«IF getDiagram().isPixelMapMode()»«defaultSizeWidth(viewmap, 40)», «defaultSizeHeight(viewmap, 40)»«ELSE»getMapMode().DPtoLP(«defaultSizeWidth(viewmap, 40)»), getMapMode().DPtoLP(«defaultSizeHeight(viewmap, 40)»)«ENDIF»);
+ «setupNodePlate»
+ return result;
+ }
+ «««END: BEGIN: PapyrusGenCode
+ «ELSE»
+ ««« «super.createNodePlate(it)»
+ ««« By default node edit part are now RoundedRectangleNodePlateFigure
+ protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure result = new org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure(«IF getDiagram().isPixelMapMode()»«defaultSizeWidth(viewmap, 40)», «defaultSizeHeight(viewmap, 40)»«ELSE»getMapMode().DPtoLP(«defaultSizeWidth(viewmap, 40)»), getMapMode().DPtoLP(«defaultSizeHeight(viewmap, 40)»)«ENDIF»);
+ «setupNodePlate»
+ return result;
+ }
+ «ENDIF»
+ '''
+
override borderItemSelectionEditPolicy(GenNode it)'''
«IF hasBorderItems(it)»
org.eclipse.gmf.runtime.notation.View childView = (org.eclipse.gmf.runtime.notation.View) child.getModel();

Back to the top