Hi Dhananjay,
I suppose you have a metamodel
With an element name YourMetaModelElement
With a reference "umlElement : EObject"

If it is not the case you have to code a query which returns the uml element 
from your metamodel element

In your gendoc2 template you just have to set in context the file corresponding 
to your metamodel and the corresponding code shall work :
[let element : YourMetaModelElement = self]
                [element.umlElement.getAllDiagrams/]
[/let]


If you want to plug a wizard to your custom file extension you can take a look 
to extension points defined in org.Topcased.gendoc2.ui to plug your template.

Regards

Tristan FAURE
De : topcased-users-boun...@gforge.enseeiht.fr 
[mailto:topcased-users-boun...@gforge.enseeiht.fr] De la part de Topcased user 
list where issues are discussed
Envoyé : lundi 26 mars 2012 06:20
À : topcased-us...@gforge.enseeiht.fr
Objet : Re: [Topcased-users] Adding diagrams to Gendoc

Hello Tristan,

We are using UML models created with TOPCASED. Only change here, is that 
instead of using Right Click on .uml file to generate document, we have only 
layer in between. This layer is our meta model, which loads UML files (apart 
from other types of files like XML, Config and so on). So I have the UML model  
(which has the class diagrams), which I can extract from our main model. 
Question is how do I pass this to in gendoc template to display the diagram

Thanks and Regards,

Dhananjay Ghanwat
Technical Architect
M +91 9960556644
dhananjay.ghan...@atos.net<mailto:dhananjay.ghan...@atos.net>
Pune, Phase 2
www.atos.net<http://www.atos.net>

[Description: atos_logotype]

From: 
topcased-users-boun...@gforge.enseeiht.fr<mailto:topcased-users-boun...@gforge.enseeiht.fr>
 [mailto:topcased-users-boun...@gforge.enseeiht.fr] On Behalf Of Topcased user 
list where issues are discussed
Sent: 21 March 2012 20:12
To: topcased-us...@gforge.enseeiht.fr<mailto:topcased-us...@gforge.enseeiht.fr>
Subject: Re: [Topcased-users] Adding diagrams to Gendoc

Hi Dhananjay,
If you are using UML models you can display the diagrams if they already exist 
and if they have been created with TOPCASED.
Do you want to generate them dynamically ?

Regards

Tristan FAURE


De : 
topcased-users-boun...@gforge.enseeiht.fr<mailto:topcased-users-boun...@gforge.enseeiht.fr>
 [mailto:topcased-users-boun...@gforge.enseeiht.fr] De la part de Topcased user 
list where issues are discussed
Envoyé : mercredi 21 mars 2012 10:49
À : topcased-us...@gforge.enseeiht.fr<mailto:topcased-us...@gforge.enseeiht.fr>
Objet : [Topcased-users] Adding diagrams to Gendoc

Hello,

I am aware there is nice feature in Gendoc to display diagrams using following 
syntax

<gendoc>[if (self.getAllDiagrams()->size() > 0)]<image 
object='[self.getDiagram()/]' maxW='true'>

However , in my scenario, we have our own meta-model. This meta model 
internally loads all the .uml files present in the eclipse project and gives me 
an instance of org.eclipse.uml2.uml.Model (one for each .uml) file  which is a 
subtype of  org.eclipse.uml2.uml.Package

My question is , is it possible to display diagrams from this meta model


Thanks and Regards,

Dhananjay Ghanwat
Technical Architect
M +91 9960556644
dhananjay.ghan...@atos.net<mailto:dhananjay.ghan...@atos.net>
Pune, Phase 2
www.atos.net<http://www.atos.net>

[Description: atos_logotype]

________________________________
This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos group liability cannot be triggered for the 
message content. Although the sender endeavors to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.
________________________________
________________________________

Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité du groupe Atos ne pourra être 
engagée quant au contenu de ce message. Bien que les meilleurs efforts soient 
faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne 
donne aucune garantie à cet égard et sa responsabilité ne saurait être engagée 
pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos group liability cannot be triggered for the 
message content. Although the sender endeavors to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.

________________________________
This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos group liability cannot be triggered for the 
message content. Although the sender endeavors to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.
________________________________

<<inline: image001.gif>>

<<inline: image002.gif>>

_______________________________________________
Topcased-users mailing list
Topcased-users@lists.gforge.enseeiht.fr
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users

Reply via email to