[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: add .xpt template
|
Hello Aurelien,
Will it be supported with the new version of GMF which use QvTo?
No, it's not planned.
if you have an example ant task to generate it...
Here it is (build.xml from org.eclipse.gmf.graphdef.editor plugin):
<project name="graphdef.editor" default="main" xmlns:xpt="eclipse.org/gmf/2008/xpand">
<property name="graphdef.plugin" value="platform:/resource/org.eclipse.gmf.graphdef.editor"/>
<property name="formtk.plugin" value="platform:/resource/org.eclipse.gmf.formtk"/>
<target name="main">
<antcall target="generateSection">
<param name="section" value="Size"/>
</antcall>
<antcall target="generateSection">
<param name="section" value="Layout"/>
</antcall>
<antcall target="generateSection">
<param name="section" value="LayoutData"/>
</antcall>
<antcall target="generateSection">
<param name="section" value="Figure"/>
</antcall>
</target>
<target name="generateSection">
<xpt:template
name="PropSheet::Main"
inputURI="${graphdef.plugin}/models/${section}Section.xmi#/"
templateroot="${graphdef.plugin}/templates-context,${graphdef.plugin}/templates-propsheet,${formtk.plugin}/templates-propsheet,${formtk.plugin}/templates-formpage,${formtk.plugin}/templates-context,${formtk.plugin}/templates-widget"
outfile="${basedir}/src-extra/org/eclipse/gmf/graphdef/editor/sheet/${section}Section.java"/>
</target>
</project>
I can generate all diagram code using an ant task? or is there
limitations? which?
No, it's not supported now. You can generate diagram code using UI action
only and you can generate additional classes using modified UI action or
using ant file.
calling a doGenerateJavaClass I suppose at first sight?
Right you can call doGenerateJavaClass() from GeNeratorExt class.
-----------------
Alex Shatalin