|
Re: URIConverter [message #479740 is a reply to message #479713] |
Wed, 12 August 2009 09:34 |
Ed Merks 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/
|
|
|
Powered by
FUDForum. Page generated in 0.02380 seconds