Hi Stephane,
If you want to use Acceleo to transform *.umldi or *.sysmldi files, all you have to do is to select the metamodel "http://www.topcased.org/Diagrams/1.0" in Acceleo's wizard when you create a new generator, or type "metamodel http://www.topcased.org/Diagrams/1.0" just before the import statements in your *.mt file. This metamodel is delivered with the UML and SysML editors. Here's a small script that will enable you to print the number of activity diagrams defined in a *.sysmldi file (by the way, you can learn a lot on *.umldi and *.sysmldi files by opening one in a simple text editor and by having a look at the xml tree in contains. That's how I came up with the 'semanticModel.presentation == "org.topcased.modeler.sysml.activitydiagram"' condition for instance) : <% metamodel http://www.topcased.org/Diagrams/1.0 %> <%script type="model.Diagrams" name="dumpDiagramsInfo" post="trim()" file="<%if (parent == null) {%>ModelDiagramsInfo.txt<%}%>"%> Number of activity diagrams : <%descendant.filter("Diagram")[semanticModel.presentation == "org.topcased.modeler.sysml.activitydiagram"].nSize()%> Regards, Martin Neidert -----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de [email protected] Envoyé : jeudi 18 juin 2009 11:25 À : [email protected] Objet : [Topcased-users] [DI]Diagram Interchange metamodel Hello, I'm using TopCased as UML modeler as UML modeller and Acceleo as model-to-text framework. I have to generate code from TopCased class diagrams ( not from model but really from class diagramms ). For that purpose, I need the Diagram interchange metamodel used by TopCased. Does someone know where I can find it ? I first thought that this could be a metamodel of one of the eclipse modelling projects. But a look in my umldi file showed that the namespace udes where Tocased name spaces. I therefore guess that the meta-model used is specific to TopCased. That's why I looking for it here. If someone could help ... Regards, Stephane _______________________________________________ Topcased-users mailing list [email protected] http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users _______________________________________________ Topcased-users mailing list [email protected] http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users
