Hi Jean Claude
There is 2 ways to resolve your problem(in both ways you have to create a 
plugin):

-          Use EMF URI Extension mechanism to define a new protocol

o   Plugin : org.eclipse.emf.ecore

o   Extension point : protocol_parser
Example model=yourProtocol/id
With EMF extension point you could have the possibility to load your model

-          Override the EMF Model Loader Service.

o   Plugin org.topcased.gendoc2.services

o   Extension point : services

§  Id : what you whant (example : customID)

§  Class : your implementation of IEMFModelLoaderService

§  Service type : EMFModelLoaderService (dependency 
org.topcased.gendoc2.tags.handler)

o   Once the class is implemented and registered you can declare in your 
document the id of the service "customID" in context tag example :

o   Example : <context model='${model}' element='RootElement' 
services='customID'/>

If you have more questions or if you need details feel free to ask

Regards

Tristan FAURE


De : [email protected] 
[mailto:[email protected]] De la part de Topcased user 
list where issues are discussed
Envoyé : mercredi 2 octobre 2013 12:43
À : [email protected]
Objet : [Topcased-users] Inject parameters in gendoc2

Hi, I am using gendoc2 with an EMF model.
For now, It is working, I defined the model path in <config/> tag and the root 
element in <context/> tag doing this :

<context model='$model' element='RootElement' importedBundles='x;y'/>

My question is this :
Currently, I need to define this root element, but what I want is  to inject 
this element by a java code.

Also, how can I launch generation using by a java class with a main method.


Thanks in advance

--
Jean Claude T
________________________________

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.
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users

Reply via email to