Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to import non xtext resources (e.g. a .ecore file)?
How to import non xtext resources (e.g. a .ecore file)? [message #641554] Fri, 26 November 2010 03:30 Go to next message
Michael Scharf is currently offline Michael ScharfFriend
Messages: 301
Registered: July 2009
Senior Member
Hi,

we are about to use ImportNamespacesScopingFragment instead of ImportURIScopingFragment.

what I do not understand is: how can I import an .ecore file?

With the URI based approach I was able to say:
import "http://www.eclipse.org/emf/2002/Ecore" as ecore

How can I import the ecore file when I use
the ImportNamespacesScopingFragment?

Do I need to use both, URI based imports and
NamespaceScoping based import?



Michael
--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: How to import non xtext resources (e.g. a .ecore file)? [message #641583 is a reply to message #641554] Fri, 26 November 2010 08:43 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Am 11/26/10 4:30 AM, schrieb Michael Scharf:
> Hi,
>
> we are about to use ImportNamespacesScopingFragment instead of
> ImportURIScopingFragment.
>
> what I do not understand is: how can I import an .ecore file?
>
> With the URI based approach I was able to say:
> import "http://www.eclipse.org/emf/2002/Ecore" as ecore
>
> How can I import the ecore file when I use
> the ImportNamespacesScopingFragment?
>
> Do I need to use both, URI based imports and
> NamespaceScoping based import?

You need to make sure, that the elements you want to refer to are being
indexed. That is you need to have an IResourceDescription.Manager for
that kind of model registered (there is an extension point).

It's explained in the sectoin in scoping :
http://www.eclipse.org/Xtext/documentation/1_0_1/xtext.html# scoping

Sven

--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Previous Topic:how to do path based imports like in java?
Next Topic:(design) question about language variable declarations
Goto Forum:
  


Current Time: Fri Mar 29 07:13:19 GMT 2024

Powered by FUDForum. Page generated in 0.02340 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top