[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: add .xpt template

Alex Shatalin a Ãcrit :
Hello Aurelien,

But when I create a new .xpt file in order to generate a class... it
seems that the .xpt is not used...
You can override/aspect exisitng GMF templates, but if you created a new one you have to either call it from any other existing (customized) GMf templates - to inject corresponding code into GMf-generated files or call separate generate code process (e.g. using ANT task) executing this template.

-----------------
Alex Shatalin



OK, thanks.
So... some more question.
I think that I will call it from existing GMF templates... but need help for that too


I looked there http://www.openarchitectureware.org/pub/documentation/4.1/r20_xPandReference.pdf

and find that we can call an other definition in an other template file if we specified the name of the template...
ÂEXPAND my::templates::TemplateFile::definitionName
FOR myModelElementÂ


So I try various things and I have some questions :
Where do I start the path? (my??)
What is the myModelElement? (gmfgen::GenCustomPropertyTab??)

info :
templates
  -xpt
    -propsheet
       - existingTemplate.xpt where I put the EXPAND instruction [1]
       - newTemplate.xpt with [2]


I thought it is something like that but it's seems not...

[1]
[...]
ÂEXPAND xpt::propsheet::newTemplate::Class
FOR gmfgen::GenCustomPropertyTabÂ
[...]

[2]
[...]
ÂDEFINE Class FOR gmfgen::GenCustomPropertyTabÂ
	//what i want to generate
ÂENDDEFINEÂ
[...]