Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 72ecc299a315aec9a997207699ce523d1c07c410 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
		}
	}

}

Back to the top