[Xpand] MWE2 Workflow fails with package uri not found [message #1311456] |
Wed, 23 April 2014 16:25  |
Eclipse User |
|
|
|
Hi, I am new to Xpand and falling at the first hurdle :(
I have modified the example MWE and MWE2 workflows to try my own model
and both fail with something like:
80 ERROR Mwe2Launcher - Problems running workflow
xpand.example.Generator: Couldn't load resource under
platform:/resource/com.test.xpand/src/Test.xmi :
org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri
'http://my.test.com/1.0' not found.
(platform:/resource/com.test.xpand/src/Test.xmi, 2, 180)
In my Test.xmi file there is a reference to the http://my.test.com/1.0 uri:
xmlns:com.test="http://my.test.com/1.0"
In the manifest.mf for my Xpand generator project I have added my EMF
project as a dependancy:
Require-Bundle: org.eclipse.jdt.core;bundle-version="3.5.0",
org.eclipse.xtend.profiler;resolution:=optional,
...,
com.test.emf;bundle-version="1.0.0"
And within the plugin.xml of the EMF project the following extension
point uses this URI:
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- @generated TEST -->
<package
uri="http://my.test.com/1.0"
class="com.test.TestPackage"
genModel="model/Test.genmodel"/>
</extension>
Thanks to any one who can help me figure out what I am missing from my
setup?
Nigel
|
|
|
|
|
|
|
Re: [Xpand] MWE2 Workflow fails with package uri not found [message #1313550 is a reply to message #1312194] |
Thu, 24 April 2014 19:37  |
Eclipse User |
|
|
|
Hi Ed,
I've installed the MWE2 plugins and they have made my MWE files easier
to read but my Xpand file is now showing as having errors everywhere? Is
there a validator being triggered that should not be?
BTW I also found if I try and uninstall these plugins my eclipse hangs
on restart trying to load org.eclipse.xtext.ui.shared. I guess they pull
out a dependency they should not :(
Any advice on the former part welcome, as the editor makes life a lot
simpler.
Nigel
On 23/04/2014 23:26, Ed Willink wrote:
> Hi
>
> If you install the MWE2 language feature you get a nice Xtext editor for
> MWE and don't have to work within <>'s.
>
> Regards
>
> Ed Willink
>
> On 23/04/2014 23:26, Nigel Daniels wrote:
>> Hi Christian,
>>
>> thanks for helping, my MWE file looks like the following:
>>
>> <?xml version="1.0"?>
>> <workflow>
>> <property name="jad" value="com.test.xpand/src/Test.xmi" />
>> <property name="src-gen" value="src-gen" />
>>
>> <!-- set up EMF for standalone execution -->
>> <bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
>> <platformUri value="../"/>
>> </bean>
>>
>> <!-- instantiate metamodel -->
>> <bean id="mm_emf"
>> class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel" />
>>
>> <!-- load model and store it in slot 'model' -->
>> <component class="org.eclipse.emf.mwe.utils.Reader">
>> <uri value="platform:/resource/${jad}" />
>> <modelSlot value="jad" />
>> </component>
>>
>> <!-- Clear output directory -->
>> <component class="org.eclipse.emf.mwe.utils.DirectoryCleaner">
>> <directory value="${src-gen}"/>
>> </component>
>>
>> <!-- generate code -->
>> <component class="org.eclipse.xpand2.Generator">
>> <metaModel idRef="mm_emf"/>
>> <expand
>> value="template::JADTemplate::main FOR jaf" />
>> <outlet path="${src-gen}" />
>> <resourceManager class
>> ="org.eclipse.xtend.expression.ResourceManagerDefaultImpl">
>> <fileEncoding value="UTF-8"/>
>> </resourceManager>
>> </component>
>> </workflow>
>>
>> It is based on the example file.
>>
>>
>> On 23/04/2014 14:39, Christian Dietrich wrote:
>>> How does the MWe file look like. The package registration should be the
>>> , usually in the standalonesetup
>>
>
|
|
|
Powered by
FUDForum. Page generated in 0.07708 seconds