EDate and XPand [message #627424] |
Wed, 22 September 2010 20:22  |
Eclipse User |
|
|
|
Hi,
I'm having trouble using an ecore EDate in my template. When I do:
«mydate»
I get a formatted date:
Mon Sep 20 00:00:00 PDT 2010
Unfortunately, my output (of course) needs to be a different format, i.e.:
Sep 20 2010 00:00:00 GMT-0600
Now, in my XPand editor I can do:
mydate.toGMTString()
with auto-completion signifying that I've actually got an EDate. But when I try to runt the workflow, I get:
959 ERROR WorkflowRunner - Workflow interrupted. Reason: Couldn't find operation 'toGMTString()' for Object.
Perhaps I've got something in my workflow mis-configured? I've tried explicitly registering Ecore, i.e.
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
<platformUri value=".."/>
...
<registerGeneratedEPackage value="org.eclipse.emf.ecore.EcorePackage"/>
</bean>
|
|
|
|
|
|
|
|
|
Re: EDate and XPand [message #629848 is a reply to message #629712] |
Wed, 29 September 2010 14:02  |
Eclipse User |
|
|
|
Christian Dietrich wrote on Wed, 29 September 2010 07:00 |
<bean id="emf" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
<bean id="java" class="org.eclipse.xtend.type.impl.java.JavaBeansMetaModel"/>
..
<component class="org.eclipse.xpand2.Generator">
<metaModel idRef="emf"/>
<metaModel idRef="java"/>
metamodelContributor=org.eclipse.xtend.typesystem.emf.ui.Emf MetamodelContributor,org.eclipse.xtend.shared.ui.core.metamo del.jdt.javabean.JavaBeanMetamodelContributor
~Christian
|
Thanks Christian. I wasn't aware that you could have multiple metaModel idRefs. It would be helpful I think to have reference docs on this somewhere as otherwise we end up digging through the API docs to try to uncover this information.
I did setup the settings the way you describe above but while the generator works fine the parser still complains. I'm actually having this issue with my own meta-models as well, so that may just be something messed up in my runtime.
cheers and thanks again,
Miles
|
|
|
Powered by
FUDForum. Page generated in 0.05450 seconds