Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2014-09-09 15:00:59 +0000
committerMickael ADAM2014-09-23 12:06:57 +0000
commit3d8a37d4c55ba794588e8f17d5abc89aa9a8fcb4 (patch)
tree6072e6f533d7c79e7cde62a70c1cd5a1fef6445b /plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ExternalNodeLabelEditPart.xtend
parent802249ab83497e7e4f8b472a89c92b3486db874b (diff)
downloadorg.eclipse.papyrus-3d8a37d4c55ba794588e8f17d5abc89aa9a8fcb4.tar.gz
org.eclipse.papyrus-3d8a37d4c55ba794588e8f17d5abc89aa9a8fcb4.tar.xz
org.eclipse.papyrus-3d8a37d4c55ba794588e8f17d5abc89aa9a8fcb4.zip
440226: [All Diagrams] Allow Left side label edition (not only right
side ) https://bugs.eclipse.org/bugs/show_bug.cgi?id=440226 Patch Set 1: -Squach Previous commit Description of previous Patch Set: Patch set 1 - Applied new locator to Port of component diagram - add method to notationUtils to getIntValue etc.. Patch Set 3: -Implementation of text alignment for PortNameEP and PapyrusLabelEP(Label from connection) -Add button/command to set alignement -Fix custumStyleValueCommand Patch Set 4: -Implementation for SysML -Use of PapyrusEditPart for PortEditPart -Some Fix -TODO use generation to chance override of the portEditPart(xtend already change, but code not generated). This must be do for each diagram. It will be do on an other commit. Patch Set 2: -fix on xtend Patch set 3 et 4 et 5: -fix conflict resolved error Change-Id: Ie0699d213abd4a7c39f8cff457c7dfe27a41eba3 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ExternalNodeLabelEditPart.xtend')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ExternalNodeLabelEditPart.xtend66
1 files changed, 33 insertions, 33 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ExternalNodeLabelEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ExternalNodeLabelEditPart.xtend
index bd4ce81883b..c629356f60f 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ExternalNodeLabelEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/ExternalNodeLabelEditPart.xtend
@@ -10,45 +10,45 @@
* 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.GenExternalNodeLabel
-import org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView
-import org.eclipse.papyrus.papyrusgmfgenextension.LabelVisibilityPreference
-import xpt.Common
-
-@Singleton class ExternalNodeLabelEditPart extends diagram.editparts.ExternalNodeLabelEditPart {
- @Inject extension Common;
-
- override extendsList(GenExternalNodeLabel it) '''
+ */
+package aspects.diagram.editparts
+
+import com.google.inject.Inject
+import com.google.inject.Singleton
+import org.eclipse.gmf.codegen.gmfgen.GenExternalNodeLabel
+import org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView
+import org.eclipse.papyrus.papyrusgmfgenextension.LabelVisibilityPreference
+import xpt.Common
+
+@Singleton class ExternalNodeLabelEditPart extends diagram.editparts.ExternalNodeLabelEditPart {
+ @Inject extension Common;
+
+ override extendsList(GenExternalNodeLabel 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»
+ «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»
+ «ENDFOR»
«««END: PapyrusGenCode
- «ELSE»
+ «ELSE»
extends org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart
- «ENDIF»
- '''
-
+ «ENDIF»
+ '''
+
//we add the interface ILabelRoleProvider
- override implementsList(GenExternalNodeLabel it) '''
+ override implementsList(GenExternalNodeLabel it) '''
implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart
««« BEGIN: PapyrusGenCode
- «IF it.eResource.allContents.filter(typeof (LabelVisibilityPreference)).filter[v|v.externalNodeLabels.contains(it)].size != 0»
+ «IF it.eResource.allContents.filter(typeof (LabelVisibilityPreference)).filter[v|v.externalNodeLabels.contains(it)].size != 0»
, org.eclipse.papyrus.uml.diagram.common.editparts.ILabelRoleProvider
- «ENDIF»
+ «ENDIF»
««« END: PapyrusGenCode
- '''
-
- override additions(GenExternalNodeLabel it) '''
+ '''
+
+ override additions(GenExternalNodeLabel it) '''
««« BEGIN: PapyrusGenCode
- «IF it.eResource.allContents.filter(typeof (LabelVisibilityPreference)).filter[v|v.externalNodeLabels.contains(it)].size != 0»
+ «IF it.eResource.allContents.filter(typeof (LabelVisibilityPreference)).filter[v|v.externalNodeLabels.contains(it)].size != 0»
«generatedClassComment»
public String getLabelRole(){
return "«it.eResource.allContents.filter(typeof (LabelVisibilityPreference)).filter[v|v.externalNodeLabels.contains(it)].head.role»";//$NON-NLS-1$
@@ -58,13 +58,13 @@ import xpt.Common
public String getIconPathRole(){
return "«it.eResource.allContents.filter(typeof (LabelVisibilityPreference)).filter[v|v.externalNodeLabels.contains(it)].head.iconPathRole»";//$NON-NLS-1$
}
- «ENDIF»
+ «ENDIF»
««« END: PapyrusGenCode
- '''
-
+ '''
+
//BEGIN: PapyrusGenCode
//definition of the inheritance
- def specifyInheritance(ExtendedGenView it) '''«superOwnedEditPart»'''
-
+ def specifyInheritance(ExtendedGenView it) '''«superOwnedEditPart»'''
+
//END: PapyrusGenCode
-}
+}

Back to the top