Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF editor : Cross references with platform URIs
EMF editor : Cross references with platform URIs [message #501234] Tue, 01 December 2009 15:52 Go to next message
nquaine  is currently offline nquaine Friend
Messages: 6
Registered: July 2009
Junior Member
Hi,
I have a main model which references a second model. When I use the generated EMF editor for the main model, I use the context menu to load the resource of the second model (using Browse Workspace), and then set the reference to the second model through a property.
When my model is saved, I get the following reference (a relative path) :
<relatedSecondM href="../../../modele.second/src/model/secondMODELE.datamod#/ "/>
What I would like to have is a platform URI.
<relatedSecondM href=" platform:/resource/modele.second/src/model/secondMODELE.data mod#/ "/>

Where can I change this behaviour ?
Are my settings in genmodel inappropriate ?
Should I modify the generated code when doing the resource.save and add some kind of options ? Or does it come from the way I load the model ?
Re: EMF editor : Cross references with platform URIs [message #501259 is a reply to message #501234] Tue, 01 December 2009 16:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020203090009040709050603
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Comments below.

nquaine wrote:
> Hi,
> I have a main model which references a second model. When I use the
> generated EMF editor for the main model, I use the context menu to
> load the resource of the second model (using Browse Workspace), and
> then set the reference to the second model through a property.
> When my model is saved, I get the following reference (a relative path) :
> <relatedSecondM
> href="../../../modele.second/src/model/secondMODELE.datamod#/ "/>
> What I would like to have is a platform URI.
> <relatedSecondM href="
> platform:/resource/modele.second/src/model/secondMODELE.data mod#/ "/>
>
> Where can I change this behaviour ?
There's this option you can use:

/**
* A {@link URIHandler} value that will be used to control how
URIs are {@link URI#resolve(URI) resolved} during load
* and {@link URI#deresolve(URI) deresolved} during save.
* @see URI
* @see URIHandler
* @see XMLHelper#resolve(URI, URI)
* @see XMLHelper#deresolve(URI)
* @see URIHandlerImpl
*/
String OPTION_URI_HANDLER = "URI_HANDLER";

> Are my settings in genmodel inappropriate ? Should I modify the
> generated code when doing the resource.save and add some kind of
> options ? Or does it come from the way I load the model ?
>

--------------020203090009040709050603
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Comments below.<br>
<br>
nquaine wrote:
<blockquote cite="mid:hf3e3m$avk$1@build.eclipse.org" type="cite">Hi,
<br>
I have a main model which references a second model. When I use the
generated EMF editor for the main model, I use the context menu to load
the resource of the second model (using Browse Workspace), and then set
the reference to the second model through a property.
<br>
When my model is saved, I get the following reference (a relative path)
:
<br>
&lt;relatedSecondM
href="../../../modele.second/src/model/secondMODELE.datamod#/ "/&gt;
<br>
What I would like to have is a platform URI.
<br>
&lt;relatedSecondM href="
platform:/resource/modele.second/src/model/secondMODELE.data mod#/
"/&gt;
<br>
<br>
Where can I change this behaviour ? </blockquote>
There's this option you can use:<br>
<blockquote><small>  /**</small><br>
<small>   * A {@link URIHandler} value that will be used to control
how URIs are {@link URI#resolve(URI) resolved} during load </small><br>
<small>   * and {@link URI#deresolve(URI) deresolved} during save.</small><br>
<small>   * @see URI</small><br>
<small>   * @see URIHandler</small><br>
<small>   * @see XMLHelper#resolve(URI, URI)</small><br>
<small>   * @see XMLHelper#deresolve(URI)</small><br>
<small>   * @see URIHandlerImpl</small><br>
<small>   */</small><br>
<small>  String OPTION_URI_HANDLER = "URI_HANDLER";</small><br>
</blockquote>
<blockquote cite="mid:hf3e3m$avk$1@build.eclipse.org" type="cite">Are
my settings in genmodel inappropriate ? Should I modify the generated
code when doing the resource.save and add some kind of options ? Or
does it come from the way I load the model ?
<br>
<br>
</blockquote>
</body>
</html>

--------------020203090009040709050603--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] problems with savepoint and rollback
Next Topic:[teneo] delete help for newbie
Goto Forum:
  


Current Time: Tue Apr 23 12:47:43 GMT 2024

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

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

Back to the top