[XPand] Programatically run Workflow [message #1143505] |
Fri, 18 October 2013 08:22  |
Eclipse User |
|
|
|
my workflow;
<workflow>
<property name="modelFile"
value="platform:/resource/com.mdd4cca.msf.codegen/src/ArgeMerkeziPortalı.content" />
<property name="mmPackage" value="com.mdd4cca.msf.content.ContentPackage" />
<property name="srcGenPath" value="src-gen" />
<property name="mainDefine" value="template::Root::main" />
<property name="fileEncoding" value="Windows-1254" />
<bean id="mm" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel" />
<!-- Klasor temizler. -->
<component class="org.eclipse.emf.mwe.utils.DirectoryCleaner">
<directory value="${srcGenPath}" />
</component>
<!-- Model dosyasini okur. -->
<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="${modelFile}" />
<!-- Daha sonra kullanilmak uzere degisken tanimlar. -->
<modelSlot value="model" />
</component>
<!-- check model -->
<!-- <component class="org.eclipse.xtend.check.CheckComponent"> -->
<!-- <metaModel idRef="mm" /> -->
<!-- <checkFile value="metamodel::Checks" /> -->
<!-- <emfAllChildrenSlot value="model" /> -->
<!-- </component> -->
<component class="org.eclipse.xpand2.Generator">
<metaModel idRef="mm" />
<expand value="${mainDefine} FOR model" />
<outlet path="${srcGenPath}/">
<postprocessor class="output.CSharpBeautifier" />
</outlet>
<resourceManager
class="org.eclipse.xtend.expression.ResourceManagerDefaultImpl">
<fileEncoding value="${fileEncoding}" />
</resourceManager>
</component>
</workflow>
and when i run this workflow on runtime-eclipse via command i always get
"[ERROR]: No Definition 'template::Root::main for ..."
why i get this don't understand
anyone can help me ?
P.S i use doRun() method on Kepler
Regards
|
|
|
Re: [XPand] Programatically run Workflow [message #1143766 is a reply to message #1143505] |
Fri, 18 October 2013 12:08   |
Eclipse User |
|
|
|
Your resource manager won't be able to load the resource from the classpath. This is how the default implementation works, which is used in standalone mode. Likely you will find that ResourceManagerDefaultImpl#loadResource() will return null.
When running in a plugin, use the XpandPluginExecutionContext instead of XpandExecutionContextImpl. This registers a special resource manager, the PluginResourceManager.
Regards,
~Karsten
|
|
|
Re: [XPand] Programatically run Workflow [message #1148193 is a reply to message #1143766] |
Mon, 21 October 2013 10:34   |
Eclipse User |
|
|
|
Thanks for the answer.
As far as I know, It worked perfectly in Juno.
XpandPluginExecutionContext requires IXtendXpandProject object as a constructor parameter. How can I get IXtendXpandProject(or IProject) for an installed plugin?
Thank you.
Sincerely.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04023 seconds