[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.technology.gmt] Re: MOFscript ecore package

Hi,

If I understand your question correctly, you have in your metamodel a top level package, which contains one or more subpackages with classes within them, for example like this:

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"; name="TopLevelPackage"
nsURI="http://www.examplemm.org/ExampleMM"; nsPrefix="examplemm">
<eClassifiers xsi:type="ecore:EClass" name="ClazzA"/>
<eSubpackages name="SubPackageB" nsURI="http://www.examplemm.org/ExampleMM/SubPackageB";>
<eClassifiers xsi:type="ecore:EClass" name="ClazzB1"/>
<eClassifiers xsi:type="ecore:EClass" name="ClazzB2"/>
</eSubpackages>
<eSubpackages name="SubPackageC" nsURI="http://www.examplemm.org/ExampleMM/SubPackageB";>
<eClassifiers xsi:type="ecore:EClass" name="ClassC1"/>
</eSubpackages>
</ecore:EPackage>


In this case, all classifiers from this metamodel should be available to MOFSCript as if they were defined at the top level.

Regards,
Jon



user@xxxxxxxxxxxxxx wrote:

Hi everybody,
I want to reference a class of an ecore metamodel which is contained in a package as the invocation type for a rule:

my_metamodel.My_Class::rule(){}

where My_Class is in package P. I get the error:

Error: MTTParseError: Undefined type for metamodel ( my_metamodel ): My_Class, line: 0, column: 0

There's a workaround or am I forced to move all the classes to the default package?

Thanks