Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Problem with URIs in XMIResource
Problem with URIs in XMIResource [message #425675] Thu, 04 December 2008 14:35 Go to next message
Mario Cervera is currently offline Mario CerveraFriend
Messages: 66
Registered: July 2009
Member
Hello everyone,

I have an XMIResource (a model instance of a metamodel I've created) which
has elements with features of type ERefence which reference elements from
other model, so if I open the resource with the Text Editor I can see the
URIs as "platform:/plugin/...". My problem is that when I modify the
resource and save it... these URLs get changed to "../../plugin/...". I
don't want this behavior. Does anyone know how to avoid this?

Thanks in advance.

Mario.
Re: Problem with URIs in XMIResource [message #425683 is a reply to message #425675] Thu, 04 December 2008 15:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30897
Registered: July 2009
Senior Member
Mario,

Comments below.

Mario Cervera wrote:
> Hello everyone,
>
> I have an XMIResource (a model instance of a metamodel I've created) which
> has elements with features of type ERefence which reference elements from
> other model, so if I open the resource with the Text Editor I can see the
> URIs as "platform:/plugin/...". My problem is that when I modify the
> resource and save it... these URLs get changed to "../../plugin/...". I
> don't want this behavior. Does anyone know how to avoid this?
>
You can use the following option to prevent that.
EcoreResoruceFactoryImpl sets it like this:

result.getDefaultSaveOptions().put(XMLResource.OPTION_URI_HA NDLER,
new URIHandlerImpl.PlatformSchemeAware());

> Thanks in advance.
>
> Mario.
>
>
>
Re: Problem with URIs in XMIResource [message #425696 is a reply to message #425683] Fri, 05 December 2008 08:48 Go to previous message
Mario Cervera is currently offline Mario CerveraFriend
Messages: 66
Registered: July 2009
Member
Hi Ed,

thank you so much, that really helped a lot.

Regards.

Mario


"Ed Merks" <Ed.Merks@gmail.com> escribi
Previous Topic:Dynamic EMF examples
Next Topic:Questions about Feature Delegation
Goto Forum:
  


Current Time: Sun Feb 23 16:33:17 GMT 2020

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

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

Back to the top