Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [ACCELEO] new metamodel(add new metamodel and use it)
[ACCELEO] new metamodel [message #668791] Sat, 07 May 2011 14:10
radwane  is currently offline radwane Friend
Messages: 27
Registered: April 2011
Junior Member
hi
this is my file generator.mtl

[comment encoding = UTF-8 /]
[module generate('http://www.eclipse.org/uml2/3.0.0/UML')/]
[template public generate(aClass : Class)]
[file (aClass.name.concat('.java'), false)]
public class [aClass.name.toUpperFirst()/] {
[for (p: Property | aClass.attribute) separator('\n')]
private [p.type.name/] [p.name/];
[/for]

[for (p: Property | aClass.attribute) separator('\n')]
public [p.type.name/] get[p.name.toUpperFirst()/]() {
return this.[p.name/];
}
[/for]

[for (o: Operation | aClass.ownedOperation) separator('\n')]
public [o.type.name/] [o.name/]() {
// TODO should be implemented
}
[/for]
}
[/file]
[/template]


its ok if i choise input file .uml
but if i want to use my model .xmi i must change this ligne
[module generate('http://www.eclipse.org/uml2/3.0.0/UML')/]
but i dont know what i must write ?
Previous Topic:OWL
Next Topic:[ACCELEO] new metamodel
Goto Forum:
  


Current Time: Thu Apr 25 10:55:10 GMT 2024

Powered by FUDForum. Page generated in 0.03254 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top