|
Re: [XText] problem in importing a metamodel. [message #46268 is a reply to message #46175] |
Fri, 29 May 2009 12:07 |
Sven Efftinge Messages: 1823 Registered: July 2009 |
Senior Member |
|
|
Hi Michael,
please provide more information (code), so we can see what exactly you
did. I assume that you tried to reference the package via NS-URI.
You should use a platform:/resource URI.
Example:
import "platform:/resource/my.project/model/metamodel.ecore"
If you want to refer to an EPackage in the resource which is not the
first in the root of the resource, you'll have to add the fragment
additionally.
Hope that helps,
Sven
Michael schrieb:
> Hi,
> When I use 'import' to import a package, the editor reports the
> metamodel cannot be resolved. Even though I have copied the metamodel in
> the same directory as the grammar, the problem is still there. I do not
> know why? This may be related to 'classpath' setting, but I have no idea
> about how to set class path. Moreover, I would like to import the
> multiple packages from this metamodel. What can I do about it?
> Hints are higly appreaciated.
> Cheers
> Michael
|
|
|
Re: [XText] problem in importing a metamodel. [message #46355 is a reply to message #46268] |
Fri, 29 May 2009 12:32 |
Mikai Yang Messages: 149 Registered: July 2009 |
Senior Member |
|
|
Sven Efftinge wrote:
> Hi Michael,
>
> please provide more information (code), so we can see what exactly you
> did. I assume that you tried to reference the package via NS-URI.
> You should use a platform:/resource URI.
>
> Example:
>
> import "platform:/resource/my.project/model/metamodel.ecore"
>
> If you want to refer to an EPackage in the resource which is not the
> first in the root of the resource, you'll have to add the fragment
> additionally.
>
> Hope that helps,
> Sven
>
>
> Michael schrieb:
>> Hi,
>> When I use 'import' to import a package, the editor reports the
>> metamodel cannot be resolved. Even though I have copied the metamodel
>> in the same directory as the grammar, the problem is still there. I do
>> not know why? This may be related to 'classpath' setting, but I have
>> no idea about how to set class path. Moreover, I would like to import
>> the multiple packages from this metamodel. What can I do about it?
>> Hints are higly appreaciated.
>> Cheers
>> Michael
Hi Sven:
Thanks for your kind help. Now the problem is gone. But now I want to import the packages in the ecore model.
I don't know how to do it. Can you give me quick example?
Cheers.
Michael.
|
|
|
Powered by
FUDForum. Page generated in 0.03110 seconds