diff options
author | Quentin Le Menez | 2018-03-11 16:28:18 +0000 |
---|---|---|
committer | Quentin Le Menez | 2018-03-11 22:39:35 +0000 |
commit | 6a85d3a05d3bd942dba8e71edf82e97dce813b91 (patch) | |
tree | c58695b63c497d3af16b69f1634d3eb2de0deb49 /plugins/developer/org.eclipse.papyrus.dev.types/transforms/VisualID Migration/GuessVisualID.qvto | |
parent | ba98ab1ef4202d0489df0ae2dd2aee8fe6f378d4 (diff) | |
download | org.eclipse.papyrus-6a85d3a05d3bd942dba8e71edf82e97dce813b91.tar.gz org.eclipse.papyrus-6a85d3a05d3bd942dba8e71edf82e97dce813b91.tar.xz org.eclipse.papyrus-6a85d3a05d3bd942dba8e71edf82e97dce813b91.zip |
[Releng] [Photon] Delete old Dev framework and add a new Toolsmiths one
- Delete the old Dev releng profile and replace it with a Toolsmith one
- Add new features: Junit, Releng, Diagramgen and Debug to be released
- Move the junit framework at the root of the junit test folder
- Remove Toolsmiths from the main build as it will have its own
- Repopulate the SDK feature and distribute the excess features in theit own root parent
- Add a new views feature
- Moved the assistants to the toolsmiths folder and put them in the toolsmiths build
Change-Id: I1c0331b25607baaf1cfcc635d9c7b0d9c6d73e63
Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.dev.types/transforms/VisualID Migration/GuessVisualID.qvto')
-rw-r--r-- | plugins/developer/org.eclipse.papyrus.dev.types/transforms/VisualID Migration/GuessVisualID.qvto | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/transforms/VisualID Migration/GuessVisualID.qvto b/plugins/developer/org.eclipse.papyrus.dev.types/transforms/VisualID Migration/GuessVisualID.qvto deleted file mode 100644 index 1302cc48edc..00000000000 --- a/plugins/developer/org.eclipse.papyrus.dev.types/transforms/VisualID Migration/GuessVisualID.qvto +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) 2016 CEA LIST. - * - * 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 - */ -modeltype UML uses "http://www.eclipse.org/uml2/4.0.0/UML"; -modeltype ElementTypes uses "http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.1"; -modeltype GMFGen uses 'http://www.eclipse.org/gmf/2009/GenModel'; -modeltype PapyrusExtension uses 'http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension'; - -transformation GuessVisualID(inout gmf : GMFGen); - -main() { - gmf.objectsOfKind(PapyrusExtension::VisualIDOverride)->forEach(v) { guess(v); } - //gmf.objectsOfKind(PapyrusExtension::VisualIDOverride)->select(genView.oclIsTypeOf(GenChildNode))->forEach(v) { fix(v); } -} - -helper fix(inout v : PapyrusExtension::VisualIDOverride) { - var i := v.visualID.indexOf("Shape"); - var sub := v.visualID.substring(1, i-1); - v.child->forEach(c) { - if (c.genView.editPartClassName.indexOf("Floating") > 0) then - c.visualID := sub+"FloatingNameLabel" - else if (c.visualID.indexOf("LabelLabel") > 0) then - c.visualID := sub+"NameLabel" - else if (c.genView.editPartClassName.indexOf("Name") > 0) then - c.visualID := sub+"NameLabel" - else if (c.genView.editPartClassName.indexOf("BodyEditPart") > 0) then - c.visualID := sub+"BodyLabel" - else if (c.genView.editPartClassName.indexOf("Stereotype") > 0) then - c.visualID := sub+"StereotypeLabel" - endif endif endif endif endif - }; -} - -helper guess(inout v : PapyrusExtension::VisualIDOverride) { - var p := v.genView.elementType.uniqueIdentifier; - var p1 := p.lastIndexOf("."); - var p2 := p.indexOf("_"); - var c := p.substring(p1+1, p2); - - var s := v.genView.editPartClassName; - if v.genView.oclIsKindOf(GMFGen::GenDiagram) then { - var i := s.indexOf("Diagram"); - v.visualID := c+s.substring(1, i-1)+"Diagram"; - } else if v.genView.oclIsKindOf(GMFGen::GenChildLabelNode) then { - v.visualID := c+"Label"; - } else if v.genView.oclIsKindOf(GMFGen::GenChildSideAffixedNode) then { - v.visualID := c+"Shape"; - } else if v.genView.oclIsKindOf(GMFGen::GenCompartment) then { - s := s.replaceAll("Composite", "Structure"); - s := s.replaceAll("Packageable", "Packaged"); - var i := s.indexOf("Compartment"); - var j := s.indexOf("CN"); - v.visualID := s.substring(1, i-1).replaceFirst("(\\p{Ll})(\\p{Lu})","$1_$2")+"Compartment"+if j = 0 then '' else '_CN' endif; - } else if v.genView.oclIsKindOf(GMFGen::GenChildNode) then { - v.visualID := c+"Shape_CN"; - } else if v.genView.oclIsKindOf(GMFGen::GenTopLevelNode) then { - v.visualID := c+"Shape"; - } else if v.genView.oclIsKindOf(GMFGen::GenNodeLabel) then { - s := s.replaceAll("AppliedStereotype", "Stereotype"); - s := s.replaceAll("SpecificationEditPart", "BodyEditPart"); - var i := s.indexOf("EditPart"); - var j := s.indexOf("CN"); - v.visualID := s.substring(1, i-1).replaceAll("(\\p{Ll})(\\p{Lu})","$1_$2")+"Label"+if j = 0 then '' else '_CN' endif; - v.visualID := v.visualID.replaceAll("Floating_LabelLabel", "FloatingNameLabel"); - v.visualID := v.visualID.replaceAll("Stereotype_LabelLabel", "StereotypeLabel"); - } else if v.genView.oclIsKindOf(GMFGen::GenLink) then { - v.visualID := c+"Edge"; - } else if v.genView.oclIsKindOf(GMFGen::GenLinkLabel) then { - s := s.replaceAll("AppliedStereotype", "Stereotype"); - var i := s.indexOf("EditPart"); - v.visualID := s.substring(1, i-1).replaceAll("(\\p{Ll})(\\p{Lu})","$1_$2")+"Label"; - } - endif endif endif endif endif endif endif endif endif; -} - -helper String::indexOfUCL() : Integer { - var r := -1; - Sequence{2..self.size()}->forEach(i) { - if r = -1 and self.at(i).toUpperCase() = self.at(i) then - r := i - endif; - }; - return r; -}
\ No newline at end of file |