diff options
Diffstat (limited to 'examples/QVToExamples/MyTransfo.qvto')
-rw-r--r-- | examples/QVToExamples/MyTransfo.qvto | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/QVToExamples/MyTransfo.qvto b/examples/QVToExamples/MyTransfo.qvto new file mode 100644 index 00000000000..72ecc299a31 --- /dev/null +++ b/examples/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 |