problems with pathmap [message #478291] |
Wed, 08 April 2009 11:49  |
Eclipse User |
|
|
|
Hello all,
I am stucked ...
I am trying to add a profile called MyProfile.profile.uml to the pathmap
by adding the following extension to plugin.xml
<extension point="org.eclipse.emf.ecore.uri_mapping">
<mapping source="pathmap://MY_PROFILES/"
target="platform:/plugin/designer.umlext.editor/my_profiles ">
</mapping>
</extension>
When I try to load the profile I do something like this:
Resource inputResource = resourceSet.createResource(
URI.createURI("pathmap://MY_PROFILES/MyProfile.profile.uml"));
try {
inputResource.load(null); ####
}catch (IOException exception) {
exception.printStackTrace();
}
,but I keep getting "java.net.MalformedURLException: unknown protocol:
pathmap" exception at ####
Can someone help me by explaining what could the sources of this error?
Thanks in advance!
|
|
|
|
|
|
|
Re: problems with pathmap [message #627483 is a reply to message #478291] |
Wed, 08 April 2009 15:56  |
Eclipse User |
|
|
|
Check this:
http://www.eclipsezone.com/eclipse/forums/m92226705.html
Lucian
Sorin Fagateanu wrote:
> Hello all,
>
> I am stucked ...
>
> I am trying to add a profile called MyProfile.profile.uml to the pathmap
> by adding the following extension to plugin.xml
>
> <extension point="org.eclipse.emf.ecore.uri_mapping">
> <mapping source="pathmap://MY_PROFILES/"
> target="platform:/plugin/designer.umlext.editor/my_profiles ">
> </mapping>
> </extension>
>
> When I try to load the profile I do something like this:
>
> Resource inputResource = resourceSet.createResource(
> URI.createURI("pathmap://MY_PROFILES/MyProfile.profile.uml"));
>
> try {
> inputResource.load(null); ####
> }catch (IOException exception) {
> exception.printStackTrace();
> }
>
> ,but I keep getting "java.net.MalformedURLException: unknown protocol:
> pathmap" exception at ####
>
> Can someone help me by explaining what could the sources of this error?
>
>
> Thanks in advance!
|
|
|
Re: problems with pathmap [message #627485 is a reply to message #478293] |
Thu, 09 April 2009 06:34  |
Eclipse User |
|
|
|
Thank you Lucian,I have read that article ,but I have more questions.
Now I am updating the pathmap like this:
Map uriMap = resourceSet.getURIConverter().getURIMap();
uriMap.put(URI.createURI("pathmap://MY_PROFILES/"),
uri.appendSegment("my_profiles").appendSegment(""));
My question is why do I have to add into the pathmap manualy and why the
extension "org.eclipse.emf.ecore.uri_mapping" isn't sufficient to
automaticaly add to pathmap.
At the moment in my plugin.xml I have only the extension
"org.eclipse.emf.ecore.uri_mapping".Are there necessar other extensions or
other code?
Sorin
|
|
|
Re: problems with pathmap [message #627486 is a reply to message #478295] |
Thu, 09 April 2009 11:01  |
Eclipse User |
|
|
|
Sorin,
That is only required if your code runs in a standalone Java application.
If your code runs in an Eclipse application, that is not needed, the
markup in plugin.xml should be enough.
Which one is the case?
See:
EMF FAQ: http://tinyurl.com/d72o47
UML FAQ: http://tinyurl.com/ce4p4u
Cheers,
Rafael
http://abstratt.com/blog/
Sorin Fagateanu wrote:
> Thank you Lucian,I have read that article ,but I have more questions.
>
> Now I am updating the pathmap like this:
>
> Map uriMap = resourceSet.getURIConverter().getURIMap();
>
> uriMap.put(URI.createURI("pathmap://MY_PROFILES/"),
> uri.appendSegment("my_profiles").appendSegment(""));
>
>
> My question is why do I have to add into the pathmap manualy and why the
> extension "org.eclipse.emf.ecore.uri_mapping" isn't sufficient to
> automaticaly add to pathmap.
>
> At the moment in my plugin.xml I have only the extension
> "org.eclipse.emf.ecore.uri_mapping".Are there necessar other extensions
> or other code?
>
>
> Sorin
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.13330 seconds