Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-04-02 08:09:52 +0000
committercletavernie2013-04-02 08:09:52 +0000
commit910541f31f5944b1979b313ccd678d70e3f83a4b (patch)
treee8a0f9978b81543318bd7537cfac5e2f37a52945 /examples/user/org.eclipse.papyrus.examples.user.QVToExamples/MyTransfo.qvto
parent3caf4611c5a5652a6453e25cae1f47696cf79c7d (diff)
downloadorg.eclipse.papyrus-910541f31f5944b1979b313ccd678d70e3f83a4b.tar.gz
org.eclipse.papyrus-910541f31f5944b1979b313ccd678d70e3f83a4b.tar.xz
org.eclipse.papyrus-910541f31f5944b1979b313ccd678d70e3f83a4b.zip
341925: [refactor] move examples\QVToExamples --> examples\user/oep.example.user.QVToExamples
https://bugs.eclipse.org/bugs/show_bug.cgi?id=341925
Diffstat (limited to 'examples/user/org.eclipse.papyrus.examples.user.QVToExamples/MyTransfo.qvto')
-rw-r--r--examples/user/org.eclipse.papyrus.examples.user.QVToExamples/MyTransfo.qvto16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/user/org.eclipse.papyrus.examples.user.QVToExamples/MyTransfo.qvto b/examples/user/org.eclipse.papyrus.examples.user.QVToExamples/MyTransfo.qvto
new file mode 100644
index 00000000000..72ecc299a31
--- /dev/null
+++ b/examples/user/org.eclipse.papyrus.examples.user.QVToExamples/MyTransfo.qvto
@@ -0,0 +1,16 @@
+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