Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » URIConverter
URIConverter [message #479713] Wed, 12 August 2009 07:21 Go to next message
Ingrid is currently offline IngridFriend
Messages: 4
Registered: July 2009
Junior Member
Hi

I wonder if the URIConverter is the same for all projects in a workspace?
I have a bunch of "keys" that are mapped to different directories.
Different projects have the same keys but mapped to different locations.

Is this possible or will the projects overwrite eachothers mappings?

Thanks
/Ingrid
Re: URIConverter [message #479740 is a reply to message #479713] Wed, 12 August 2009 09:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090801030504060108040700
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Ingrid,

Comments below.


Ingrid wrote:
> Hi
>
> I wonder if the URIConverter is the same for all projects in a workspace?
The URIConverter interface does declare a global instance but as it
says, it's best not to modify this instance in any way.

/**
* The global static URI converter instance.
* It's generally not a good idea to modify any aspect of this
instance.
* Instead, use a resource set's {@link
ResourceSet#getURIConverter() local} instance.
* @since 2.4
*/
URIConverter INSTANCE = new ExtensibleURIConverterImpl();

> I have a bunch of "keys" that are mapped to different directories.
There's also a global URI map, but as it says, it's normally populated
by plugin.xml registrations and obviously

/**
* The global static URI map.
* Registrations made in this instance will (typically) be available
* for {@link URIConverter#normalize use} by any URI converter.
* It is populated by URI mappings registered via
* {@link
org.eclipse.emf.ecore.plugin.EcorePlugin.Implementation#star tup()
plugin registration}.
* @see #normalize(URI)
*/
Map<URI, URI> URI_MAP =
org.eclipse.emf.ecore.resource.impl.URIMappingRegistryImpl.I NSTANCE.map();

> Different projects have the same keys but mapped to different locations.
Each ResourceSet has it's own URIConverter with its own URI map so as
long as you modify things in your local resource set instance you have
complete control over the registrations.
>
> Is this possible or will the projects overwrite eachothers mappings?
Not if they use separate resource set instances.
> Thanks
> /Ingrid
>

--------------090801030504060108040700
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ingrid,<br>
<br>
Comments below.<br>
<br>
<br>
Ingrid wrote:
<blockquote
cite="mid:a9bc9361fb339f5e57e9c5cb141dfa61$1@www.eclipse.org"
type="cite">Hi
<br>
<br>
I wonder if the URIConverter is the same for all projects in a
workspace?
<br>
</blockquote>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Ecore2Java: differences with the GenModel context menu?
Next Topic:Understanding Adapters
Goto Forum:
  


Current Time: Fri Apr 26 17:32:49 GMT 2024

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

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

Back to the top