Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Le Fevre2017-08-25 11:49:56 +0000
committerAnsgar Radermacher2017-08-29 08:50:00 +0000
commit7ad7418414a89843876a72e068cced15634447c8 (patch)
treedd40cec1846806b9cdd5bed9a3ae22cd69210a81 /examples/user/org.eclipse.papyrus.examples.user.qvto/src/main/resources/models/MyTransfo.qvto
parentb65d27c921639e6675dfbef5b7d11565bba4887c (diff)
downloadorg.eclipse.papyrus-7ad7418414a89843876a72e068cced15634447c8.tar.gz
org.eclipse.papyrus-7ad7418414a89843876a72e068cced15634447c8.tar.xz
org.eclipse.papyrus-7ad7418414a89843876a72e068cced15634447c8.zip
Bug 521409: [examples] create an example of project to manage examples
models Actions -rename the plugin -add it to the biuld reactor -respect convention for maven plugins that acts as pom Test -start an eclipse applciation and check presence of the Example in new examples Change-Id: I64953fa92c63ef91967bb1a1888977875e72eb97 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=521409 Signed-off-by: Francois Le Fevre <francois.le-fevre@cea.fr>
Diffstat (limited to 'examples/user/org.eclipse.papyrus.examples.user.qvto/src/main/resources/models/MyTransfo.qvto')
-rw-r--r--examples/user/org.eclipse.papyrus.examples.user.qvto/src/main/resources/models/MyTransfo.qvto30
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/user/org.eclipse.papyrus.examples.user.qvto/src/main/resources/models/MyTransfo.qvto b/examples/user/org.eclipse.papyrus.examples.user.qvto/src/main/resources/models/MyTransfo.qvto
new file mode 100644
index 00000000000..5b4ec6c70dd
--- /dev/null
+++ b/examples/user/org.eclipse.papyrus.examples.user.qvto/src/main/resources/models/MyTransfo.qvto
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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:
+ * Francois Le Fevre (CEA LIST) francois.le-fevre@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+modeltype UML uses 'http://www.eclipse.org/uml2/3.0.0/UML';
+transformation MyTransformation(inout model : UML){
+
+ main() {
+ //Get the root of the model
+ var root := model.rootObjects()![UML::Model];
+ //Get all the classes in this model
+ var clazzes := model.objectsOfType(Class)->asSequence();
+
+ //Prefix all of them
+ clazzes->forEach(el){
+ el.name := "MySystem-"+el.name;
+ }
+ }
+
+} \ No newline at end of file

Back to the top