|
Re: Unable to resolve plug-in URIs that contain underscore [message #496524 is a reply to message #496414] |
Tue, 10 November 2009 12:34 |
Ed Merks Messages: 33133 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------000004000504050705030308
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Mirko,
EMF does nothing special to resolve these types of URIs. They're simply
handled as a URL and then the normal URL behavior kicks in. In this
case, the Eclipse platform itself registers a URLHandler which is
responsible for actually producing the stream. My guess is that because
the platform encodes the forth digit (qualifier) of a version into the
name, i.e., org.eclipse.ui*_3.5.0.I20090728-0800a*.jar, that they might
be doing special processing with the segment following the _ and that
this processing is what's causing the problem. It seems to me though
that if they allow you to use an _ they should do the necessary
processing to handle it correctly...
Mirko Seifert wrote:
> Hi,
>
> I try to load a genmodel that is contained in a plug-in using the
> following code:
>
> URI uri =
> URI.createURI(" platform:/plugin/org.doesntmatter.some_plugin/metamodel/some _model.genmodel ");
>
> ResourceSet rs = new ResourceSetImpl();
> Resource r = rs.createResource(uri);
> try {
> r.load(null);
> } catch (IOException e) {
> e.printStackTrace();
> }
>
> When I run this code (e.g., as JUnit Plug-in test) I get an
> java.io.IOException: Unable to resolve plug-in...
>
> When I rename the plugin 'org.doesntmatter.some_plugin' to
> 'org.doesntmatter.someplugin' (without underscore) the code works fine.
>
> Am I missing something here? I can observe the same problem, when I
> try to load the genmodel in the Sample Ecore Editor (Load
> Resource->Browse Registered Packages).
>
> I'm running Galileo SR1.
>
> Any help is appreciated very much!
>
> Mirko
--------------000004000504050705030308
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">
Mirko,<br>
<br>
EMF does nothing special to resolve these types of URIs.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 1.86771 seconds