Unknown ocl::uml::Constraint propery, variable, type or enumeration literal 'specification' [message #508120] |
Sat, 16 January 2010 07:20 |
Siamak Haschemi Messages: 13 Registered: January 2010 |
Junior Member |
|
|
Hello,
when I create a new Xpand Project (my.generator.project), add the dependency to the uml metamodel and write the following template definitions:
«DEFINE foo FOR uml::Constraint-»
«EXPAND foo FOR specification»
«ENDDEFINE»
«DEFINE foo FOR uml::ValueSpecification-»
«ENDDEFINE»
the editor shows me the strange error:
Unknown ocl::uml::Constraint propery, variable, type or enumeration literal 'specification'
Here's my MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: my.generator.project
Bundle-SymbolicName: my.generator.project; singleton:=true
Bundle-Version: 1.0.0
Require-Bundle: org.eclipse.xpand,
org.eclipse.xtend,
org.eclipse.xtend.typesystem.emf,
org.eclipse.uml2.uml
Bundle-RequiredExecutionEnvironment: J2SE-1.5
The workflow is the standard one from the example project created with the "new XPand Project Wizard":
<?xml version="1.0"?>
<workflow>
<property name="model" value="my.generator.project/src/Model.xmi" />
<property name="src-gen" value="src-gen" />
<!-- set up EMF for standalone execution -->
<bean class="org.eclipse.mwe.emf.StandaloneSetup" >
<platformUri value=".."/>
</bean>
<!-- load model and store it in slot 'model' -->
<component class="org.eclipse.mwe.emf.Reader">
<uri value="platform:/resource/${model}" />
<modelSlot value="model" />
</component>
<!-- check model -->
<component class="org.eclipse.xtend.check.CheckComponent">
<metaModel id="mm"
class="org.eclipse.m2t.type.emf.EmfRegistryMetaModel"/>
<checkFile value="metamodel::Checks" />
<emfAllChildrenSlot value="model" />
</component>
<!-- generate code -->
<component class="org.eclipse.xtend.xpand2.Generator">
<metaModel idRef="mm"/>
<expand
value="template::Template::main FOR model" />
<outlet path="${src-gen}" >
<postprocessor class="org.eclipse.xtend.xpand2.output.JavaBeautifier" />
</outlet>
</component>
</workflow>
I use Eclipse Galileo Build id: 20090920-1017. The XPand plugin version is 0.7.2.v200908120436. The plugin 'org.eclipse.uml2.uml' has the version 3.0.1.v200908281330
What went wrong?
Cheers
|
|
|
Re: Unknown ocl::uml::Constraint propery, variable, type or enumeration literal 'specification' [message #508269 is a reply to message #508120] |
Mon, 18 January 2010 08:28 |
Sven Efftinge Messages: 1823 Registered: July 2009 |
Senior Member |
|
|
Do you have an 'ocl' import in that file?
If not it seems to be a bug and it would be very appreciated if you
could report it in bugzilla.
Sven
Siamak Haschemi schrieb:
> Hello,
>
> when I create a new Xpand Project (my.generator.project), add the
> dependency to the uml metamodel and write the following template
> definitions:
>
> «DEFINE foo FOR uml::Constraint-»
> «EXPAND foo FOR specification»
> «ENDDEFINE»
>
> «DEFINE foo FOR uml::ValueSpecification-» «ENDDEFINE»
>
> the editor shows me the strange error:
>
> Unknown ocl::uml::Constraint propery, variable, type or enumeration
> literal 'specification'
>
> Here's my MANIFEST.MF
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: my.generator.project
> Bundle-SymbolicName: my.generator.project; singleton:=true
> Bundle-Version: 1.0.0
> Require-Bundle: org.eclipse.xpand,
> org.eclipse.xtend,
> org.eclipse.xtend.typesystem.emf,
> org.eclipse.uml2.uml
> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>
>
>
> The workflow is the standard one from the example project created with
> the "new XPand Project Wizard":
>
> <?xml version="1.0"?>
> <workflow>
> <property name="model" value="my.generator.project/src/Model.xmi" />
> <property name="src-gen" value="src-gen" />
>
> <!-- set up EMF for standalone execution -->
> <bean class="org.eclipse.mwe.emf.StandaloneSetup" >
> <platformUri value=".."/>
> </bean>
>
> <!-- load model and store it in slot 'model' -->
> <component class="org.eclipse.mwe.emf.Reader">
> <uri value="platform:/resource/${model}" />
> <modelSlot value="model" />
> </component>
>
> <!-- check model -->
> <component class="org.eclipse.xtend.check.CheckComponent">
> <metaModel id="mm"
> class="org.eclipse.m2t.type.emf.EmfRegistryMetaModel"/>
> <checkFile value="metamodel::Checks" />
> <emfAllChildrenSlot value="model" />
> </component>
>
> <!-- generate code -->
> <component class="org.eclipse.xtend.xpand2.Generator">
> <metaModel idRef="mm"/>
> <expand
> value="template::Template::main FOR model" />
> <outlet path="${src-gen}" >
> <postprocessor
> class="org.eclipse.xtend.xpand2.output.JavaBeautifier" />
> </outlet>
> </component>
> </workflow>
>
> I use Eclipse Galileo Build id: 20090920-1017. The XPand plugin version
> is 0.7.2.v200908120436. The plugin 'org.eclipse.uml2.uml' has the
> version 3.0.1.v200908281330
>
> What went wrong?
>
>
> Cheers
--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
|
|
|
|
Powered by
FUDForum. Page generated in 0.03799 seconds