Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XTEND] [MWE] Error when running ProfilerComponent in 0.8.0M4 sample project
[XTEND] [MWE] Error when running ProfilerComponent in 0.8.0M4 sample project [message #507636] Thu, 14 January 2010 08:37 Go to next message
Christoph  is currently offline Christoph Friend
Messages: 16
Registered: July 2009
Junior Member
I just updated my Eclipse 3.5.1 to new version 0.8.0.M4 of Xtext, Xpand/Xtend/Check and MWE. All seems to run fine, I'm able to use the Xpand project Wizard to create the sample project, edit the DSL etc.

However, inside this sample project, when I call the generatorWithProfiler.mwe workflow to create and render a profiling model, I'm getting this exception:

2218 INFO  CompositeComponent - Generator: generating 'org::eclipse::xtend::profiler::templates::Html::Main FOR profilingResult' => profiling
2281 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component  of type org.eclipse.xpand2.Generator: 
	EvaluationException : No Definition 'org::eclipse::xtend::profiler::templates::Html::Main for profilermodel::ProfilingResult' found!
	[23,79] on line 1 'EXPAND org::eclipse::xtend::profiler::templates::Html::Main FOR profilingResult'

2281 ERROR WorkflowRunner     - Workflow interrupted. Reason: No Definition 'org::eclipse::xtend::profiler::templates::Html::Main for profilermodel::ProfilingResult' found!
2281 ERROR WorkflowRunner     - [ERROR]: No Definition 'org::eclipse::xtend::profiler::templates::Html::Main for profilermodel::ProfilingResult' found!(Element: EXPAND org::eclipse::xtend::profiler::templates::Html::Main FOR profilingResult; Reported by: Generator: generating 'org::eclipse::xtend::profiler::templates::Html::Main FOR profilingResult' => profiling)


Seems the template couldn't be found which is a bit strange given the fact that org.eclipse.xtend.profiler_0.8.0.v200912151404.jar is available in Plug-in Dependencies, and I can locate the Html.xpt in this JAR file.

Any idea? Is the sample project wizard not working correctly, or anything else misconfigured?

Thanks,
Christoph.
Re: [XTEND] [MWE] Error when running ProfilerComponent in 0.8.0M4 sample project [message #507640 is a reply to message #507636] Thu, 14 January 2010 08:45 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
This has already been fixed. Will be available in the next milestone.
The problem is that the EPackage for the profiler is not initialized.
Should be enough to add a standalonesertup component where you
initialize that package.

Something like this:

<bean class="StandaloneSetup">
<generateEPackage
class="org.eclipse.xtend.profiler.profilermodel.ModelPackage "/>
</bean>

Cheers,
Sven

Christoph schrieb:
> I just updated my Eclipse 3.5.1 to new version 0.8.0.M4 of Xtext,
> Xpand/Xtend/Check and MWE. All seems to run fine, I'm able to use the
> Xpand project Wizard to create the sample project, edit the DSL etc.
>
> However, inside this sample project, when I call the
> generatorWithProfiler.mwe workflow to create and render a profiling
> model, I'm getting this exception:
>
>
> 2218 INFO CompositeComponent - Generator: generating
> 'org::eclipse::xtend::profiler::templates::Html::Main FOR
> profilingResult' => profiling
> 2281 ERROR AbstractExpressionsUsingWorkflowComponent - Error in
> Component of type org.eclipse.xpand2.Generator: EvaluationException
> : No Definition 'org::eclipse::xtend::profiler::templates::Html::Main
> for profilermodel::ProfilingResult' found!
> [23,79] on line 1 'EXPAND
> org::eclipse::xtend::profiler::templates::Html::Main FOR profilingResult'
>
> 2281 ERROR WorkflowRunner - Workflow interrupted. Reason: No
> Definition 'org::eclipse::xtend::profiler::templates::Html::Main for
> profilermodel::ProfilingResult' found!
> 2281 ERROR WorkflowRunner - [ERROR]: No Definition
> 'org::eclipse::xtend::profiler::templates::Html::Main for
> profilermodel::ProfilingResult' found!(Element: EXPAND
> org::eclipse::xtend::profiler::templates::Html::Main FOR
> profilingResult; Reported by: Generator: generating
> 'org::eclipse::xtend::profiler::templates::Html::Main FOR
> profilingResult' => profiling)
>
>
> Seems the template couldn't be found which is a bit strange given the
> fact that org.eclipse.xtend.profiler_0.8.0.v200912151404.jar is
> available in Plug-in Dependencies, and I can locate the Html.xpt in this
> JAR file.
>
> Any idea? Is the sample project wizard not working correctly, or
> anything else misconfigured?
>
> Thanks,
> Christoph.


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: [XTEND] [MWE] Error when running ProfilerComponent in 0.8.0M4 sample project [message #507641 is a reply to message #507636] Thu, 14 January 2010 08:49 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
Hi Christoph,

there was a bug in the sample project wizard that was fixed after the
0.8.0M4.
A workaround is to register the
org.eclipse.xtend.profiler.profilermodel.ModelPackage in your
StandaloneSetup via registerGeneratedEPackage.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 14.01.10 09:37, schrieb Christoph:
> I just updated my Eclipse 3.5.1 to new version 0.8.0.M4 of Xtext,
> Xpand/Xtend/Check and MWE. All seems to run fine, I'm able to use the
> Xpand project Wizard to create the sample project, edit the DSL etc.
>
> However, inside this sample project, when I call the
> generatorWithProfiler.mwe workflow to create and render a profiling
> model, I'm getting this exception:
>
>
> 2218 INFO CompositeComponent - Generator: generating
> 'org::eclipse::xtend::profiler::templates::Html::Main FOR
> profilingResult' => profiling
> 2281 ERROR AbstractExpressionsUsingWorkflowComponent - Error in
> Component of type org.eclipse.xpand2.Generator: EvaluationException : No
> Definition 'org::eclipse::xtend::profiler::templates::Html::Main for
> profilermodel::ProfilingResult' found!
> [23,79] on line 1 'EXPAND
> org::eclipse::xtend::profiler::templates::Html::Main FOR profilingResult'
>
> 2281 ERROR WorkflowRunner - Workflow interrupted. Reason: No Definition
> 'org::eclipse::xtend::profiler::templates::Html::Main for
> profilermodel::ProfilingResult' found!
> 2281 ERROR WorkflowRunner - [ERROR]: No Definition
> 'org::eclipse::xtend::profiler::templates::Html::Main for
> profilermodel::ProfilingResult' found!(Element: EXPAND
> org::eclipse::xtend::profiler::templates::Html::Main FOR
> profilingResult; Reported by: Generator: generating
> 'org::eclipse::xtend::profiler::templates::Html::Main FOR
> profilingResult' => profiling)
>
>
> Seems the template couldn't be found which is a bit strange given the
> fact that org.eclipse.xtend.profiler_0.8.0.v200912151404.jar is
> available in Plug-in Dependencies, and I can locate the Html.xpt in this
> JAR file.
>
> Any idea? Is the sample project wizard not working correctly, or
> anything else misconfigured?
>
> Thanks,
> Christoph.
Re: [XTEND] [MWE] Error when running ProfilerComponent in 0.8.0M4 sample project [message #507644 is a reply to message #507636] Thu, 14 January 2010 09:11 Go to previous messageGo to next message
Christoph  is currently offline Christoph Friend
Messages: 16
Registered: July 2009
Junior Member
Thanks for your prompt answers, but... I can't figure out how to register the model package. This is what I tried:

	<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
		<registerGeneratedEPackage class="org.eclipse.xtend.profiler.profilermodel.ModelPackage"/>
	</bean>

But it gives me another error: Incompatible Classes: 'org.eclipse.xtend.profiler.profilermodel.ModelPackage' is not a subclass of the expected class 'java.lang.String'.(Element: bean registerGeneratedEPackage class='org.eclipse.xtend.profiler.profilermodel.ModelPackage ' in D:/JavaTools/dev/eclipse-ws/test/my.generator.project/src/wo rkflow/generatorWithProfiler.mwe:10; Reported by: -UNKNOWN-)

My StandaloneSetup (from org.eclipse.emf.mwe.utils_0.8.0.v200912151301.jar) doesn't seem to have a registerGeneratedEPackage method...

Wrong version of that JAR? What else?
Re: [XTEND] [MWE] Error when running ProfilerComponent in 0.8.0M4 sample project [message #507650 is a reply to message #507644] Thu, 14 January 2010 04:24 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
Hi Christoph,

you'll have to use 'value=".."' instead of 'class=".."'.

<bean class="..StandaloneSetup">
<registerGeneratedEPackage value="org..ModelPackage"/>
</bean>

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


Am 14.01.10 10:11, schrieb Christoph:
> Thanks for your prompt answers, but... I can't figure out how to
> register the model package. This is what I tried:
>
>
> <bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
> <registerGeneratedEPackage
> class="org.eclipse.xtend.profiler.profilermodel.ModelPackage "/>
> </bean>
>
> But it gives me another error: Incompatible Classes:
> 'org.eclipse.xtend.profiler.profilermodel.ModelPackage' is not a
> subclass of the expected class 'java.lang.String'.(Element: bean
> registerGeneratedEPackage
> class='org.eclipse.xtend.profiler.profilermodel.ModelPackage ' in
> D:/JavaTools/dev/eclipse-ws/test/my.generator.project/src/wo
> rkflow/generatorWithProfiler.mwe:10; Reported by: -UNKNOWN-)
>
> My StandaloneSetup (from
> org.eclipse.emf.mwe.utils_0.8.0.v200912151301.jar) doesn't seem to have
> a registerGeneratedEPackage method...
>
> Wrong version of that JAR? What else?
Re: [XTEND] [MWE] Error when running ProfilerComponent in 0.8.0M4 sample project [message #507654 is a reply to message #507650] Thu, 14 January 2010 09:32 Go to previous message
Christoph  is currently offline Christoph Friend
Messages: 16
Registered: July 2009
Junior Member
That's it... thanks a lot!
Previous Topic:[Check] Using models referencing other models in OAW
Next Topic:Standalone code generation with Xpand, Xtend, MWE without Eclipse
Goto Forum:
  


Current Time: Fri Mar 05 06:58:35 GMT 2021

Powered by FUDForum. Page generated in 0.01870 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top