Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » problems with pathmap
problems with pathmap [message #478291] Wed, 08 April 2009 15:49 Go to next message
Sorin Fagateanu is currently offline Sorin FagateanuFriend
Messages: 46
Registered: July 2009
Member
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 #478293 is a reply to message #478291] Wed, 08 April 2009 19:56 Go to previous messageGo to next message
Lazar Codrut-Lucian is currently offline Lazar Codrut-LucianFriend
Messages: 91
Registered: July 2009
Member
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 #478295 is a reply to message #478293] Thu, 09 April 2009 10:34 Go to previous messageGo to next message
Sorin Fagateanu is currently offline Sorin FagateanuFriend
Messages: 46
Registered: July 2009
Member
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 #478296 is a reply to message #478295] Thu, 09 April 2009 15:01 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
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
>
Re: problems with pathmap [message #478395 is a reply to message #478296] Fri, 15 May 2009 08:43 Go to previous message
Sorin Fagateanu is currently offline Sorin FagateanuFriend
Messages: 46
Registered: July 2009
Member
The error was that
target="platform:/plugin/designer.umlext.editor/my_profiles "> needed an extra
"/" at the end.
Re: problems with pathmap [message #627483 is a reply to message #478291] Wed, 08 April 2009 19:56 Go to previous message
Lazar Codrut-Lucian is currently offline Lazar Codrut-LucianFriend
Messages: 91
Registered: July 2009
Member
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 10:34 Go to previous message
Sorin Fagateanu is currently offline Sorin FagateanuFriend
Messages: 46
Registered: July 2009
Member
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 15:01 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
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
>
Re: problems with pathmap [message #627582 is a reply to message #478296] Fri, 15 May 2009 08:43 Go to previous message
Sorin Fagateanu is currently offline Sorin FagateanuFriend
Messages: 46
Registered: July 2009
Member
The error was that
target="platform:/plugin/designer.umlext.editor/my_profiles "> needed an extra
"/" at the end.
Previous Topic:Sequence Diagram
Next Topic:How to access the Property values of a Stereotype?
Goto Forum:
  


Current Time: Thu Apr 25 20:33:01 GMT 2024

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

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

Back to the top