Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Default search URIs for importURI
Default search URIs for importURI [message #629487] Tue, 28 September 2010 13:18 Go to next message
Dénes Harmath is currently offline Dénes HarmathFriend
Messages: 157
Registered: July 2009
Senior Member
Hi all,

how can I set multiple URIs relative to which importURIs are resolved (of course with priorities)? So e.g. if the user imports "foo" in "/qux/bar", and if "/qux/foo" is not found, it would mean "/baz/foo".

Thanks in advance,
thSoft
Re: Default search URIs for importURI [message #629494 is a reply to message #629487] Tue, 28 September 2010 13:30 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
the import URI mechanism relies on EMF's URI resolution, so
you maybe should try to register a custom URIConverter/URIHandler with
your ResourceSet.

Sven

Am 9/28/10 3:18 PM, schrieb Dennis Harmath:
> Hi all,
>
> how can I set multiple URIs relative to which importURIs are resolved
> (of course with priorities)? So e.g. if the user imports "foo" in
> "/qux/bar", and if "/qux/foo" is not found, it would mean "/baz/foo".
>
> Thanks in advance,
> thSoft


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: Default search URIs for importURI [message #629752 is a reply to message #629487] Wed, 29 September 2010 13:14 Go to previous messageGo to next message
Dénes Harmath is currently offline Dénes HarmathFriend
Messages: 157
Registered: July 2009
Senior Member
Thanks for the quick answer. Meanwhile, I found the same question: http://dev.eclipse.org/newslists/news.eclipse.modeling.tmf/m sg01016.html Hopefully these will give enough info to solve this.
Re: Default search URIs for importURI [message #630184 is a reply to message #629752] Thu, 30 September 2010 22:50 Go to previous message
Dénes Harmath is currently offline Dénes HarmathFriend
Messages: 157
Registered: July 2009
Senior Member
Based on the referenced thread, I implemented a custom ImportUriResolver which overrides resolve() to search for the given file in the default search folder in the local file system, and return the original importUri only if it is not found there. Thanks for the support!
Previous Topic:Cannot resolve references - Cross referencing on the same predicate
Next Topic:Registering a console in the Xtext UI?
Goto Forum:
  


Current Time: Thu Apr 25 14:51:09 GMT 2024

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

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

Back to the top