Home » Modeling » UML2 » UMLPrimitiveTyes
| | |
Re: UMLPrimitiveTyes [message #473176 is a reply to message #473174] |
Tue, 12 June 2007 00:29 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Andrew,
When running in Eclipse, this is done automatically via an extension point.
If your application needs to run stand-alone, you can always pass the path
of the resources plug-in in as an argument...
Kenn
"Andrew Carton" <cartona@cs.tcd.ie> wrote in message
news:f4kfnn$sda$1@build.eclipse.org...
> Thanks James, that worked. I specified the URI explicitly with the
> jar:file/path_to_uml_resources!/ etc but is there not another way of doing
> this. I don't really like to hardcode a library path into my code..
>
> Thanks very much again,
>
> Andrew.
>
>
> James Bruck wrote:
>> Hi Andrew,
>>
>> It sounds like you are not registering your pathmaps with the
>> URIConverter
>> correctly.
>> There is an example in the Migration Guide ( toward the bottom ), link
>> from
>> UML wiki.
>> Have a look there and if you still have issues, please ask again.
>>
>> - James.
>>
>> "Andrew Carton" <cartona@cs.tcd.ie> wrote in message
>> news:f4f6p5$vnj$1@build.eclipse.org...
>>> Hi,
>>>
>>> I'm trying to read a UML file and transform the UMLPrimitiveTypes into
>>> other types defined by another profile. I can not figure out how to
>>> compare an element to a UMLPrimitiveType (for example
>>> UMLPrimitiveType::Boolean). There only seems to be a eProxyURI to get
>>> at.
>>>
>>> I tried using the UMLProfile tutorial. I get the error
>>> "java.net.MalformedURLException: unknown protocol: pathmap" when I try
>>> to retrieve this.
>>>
>>> Here is the code:
>>>
>>> Model umlLibrary = (Model)
>>>
>> fileManager.load(URI.createURI(UMLResource.UML_PRIMITIVE_TYP ES_LIBRARY_URI))
>> ;
>>> Package load(URI uri)
>>> {
>>> Package package_ = null;
>>> package_ = (Package) EcoreUtil.getObjectByType(resource.getContents(),
>>> UMLPackage.Literals.PACKAGE);
>>> return package_;
>>> }
>>>
>>> Thanks,
>>> Andrew.
>>
|
|
|
Re: UMLPrimitiveTyes [message #473182 is a reply to message #473176] |
Tue, 12 June 2007 09:26 |
Andrew Carton Messages: 104 Registered: July 2009 |
Senior Member |
|
|
Hi Kenn,
Thanks for the response.
I'm currently using eclipse. Below is the piece of code I am using taken
from the UML2 Migration guide that is used to register the explicit
path. How would I register these with the URIConverter using the
extension points?
Thanks,
Andrew.
URI umlResourcePluginURI = URI
..createURI(" jar:file:/Users/cartona/eclipse/plugins/org.eclipse.uml2.uml .resources_2.1.0.v200705171545.jar!/ ");
URIConverter.URI_MAP.put(URI.createURI(UMLResource.LIBRARIES _PATHMAP),
umlResourcePluginURI.appendSegment("libraries").appendSegment(
""));
URIConverter.URI_MAP.put(URI.createURI(UMLResource.METAMODEL S_PATHMAP),
umlResourcePluginURI.appendSegment("metamodels").appendSegment(
""));
URIConverter.URI_MAP.put(URI.createURI(UMLResource.PROFILES_ PATHMAP),
umlResourcePluginURI.appendSegment("profiles")
.appendSegment(""));
Ar 12/06/2007 01:29, Scríobh Kenn Hussey:
> Andrew,
>
> When running in Eclipse, this is done automatically via an extension point.
> If your application needs to run stand-alone, you can always pass the path
> of the resources plug-in in as an argument...
>
> Kenn
>
> "Andrew Carton" <cartona@cs.tcd.ie> wrote in message
> news:f4kfnn$sda$1@build.eclipse.org...
>> Thanks James, that worked. I specified the URI explicitly with the
>> jar:file/path_to_uml_resources!/ etc but is there not another way of doing
>> this. I don't really like to hardcode a library path into my code..
>>
>> Thanks very much again,
>>
>> Andrew.
>>
>>
>> James Bruck wrote:
>>> Hi Andrew,
>>>
>>> It sounds like you are not registering your pathmaps with the
>>> URIConverter
>>> correctly.
>>> There is an example in the Migration Guide ( toward the bottom ), link
>>> from
>>> UML wiki.
>>> Have a look there and if you still have issues, please ask again.
>>>
>>> - James.
>>>
>>> "Andrew Carton" <cartona@cs.tcd.ie> wrote in message
>>> news:f4f6p5$vnj$1@build.eclipse.org...
>>>> Hi,
>>>>
>>>> I'm trying to read a UML file and transform the UMLPrimitiveTypes into
>>>> other types defined by another profile. I can not figure out how to
>>>> compare an element to a UMLPrimitiveType (for example
>>>> UMLPrimitiveType::Boolean). There only seems to be a eProxyURI to get
>>>> at.
>>>>
>>>> I tried using the UMLProfile tutorial. I get the error
>>>> "java.net.MalformedURLException: unknown protocol: pathmap" when I try
>>>> to retrieve this.
>>>>
>>>> Here is the code:
>>>>
>>>> Model umlLibrary = (Model)
>>>>
>>> fileManager.load(URI.createURI(UMLResource.UML_PRIMITIVE_TYP ES_LIBRARY_URI))
>>> ;
>>>> Package load(URI uri)
>>>> {
>>>> Package package_ = null;
>>>> package_ = (Package) EcoreUtil.getObjectByType(resource.getContents(),
>>>> UMLPackage.Literals.PACKAGE);
>>>> return package_;
>>>> }
>>>>
>>>> Thanks,
>>>> Andrew.
>
|
|
| | | |
Re: UMLPrimitiveTyes [message #619994 is a reply to message #473174] |
Tue, 12 June 2007 00:29 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Andrew,
When running in Eclipse, this is done automatically via an extension point.
If your application needs to run stand-alone, you can always pass the path
of the resources plug-in in as an argument...
Kenn
"Andrew Carton" <cartona@cs.tcd.ie> wrote in message
news:f4kfnn$sda$1@build.eclipse.org...
> Thanks James, that worked. I specified the URI explicitly with the
> jar:file/path_to_uml_resources!/ etc but is there not another way of doing
> this. I don't really like to hardcode a library path into my code..
>
> Thanks very much again,
>
> Andrew.
>
>
> James Bruck wrote:
>> Hi Andrew,
>>
>> It sounds like you are not registering your pathmaps with the
>> URIConverter
>> correctly.
>> There is an example in the Migration Guide ( toward the bottom ), link
>> from
>> UML wiki.
>> Have a look there and if you still have issues, please ask again.
>>
>> - James.
>>
>> "Andrew Carton" <cartona@cs.tcd.ie> wrote in message
>> news:f4f6p5$vnj$1@build.eclipse.org...
>>> Hi,
>>>
>>> I'm trying to read a UML file and transform the UMLPrimitiveTypes into
>>> other types defined by another profile. I can not figure out how to
>>> compare an element to a UMLPrimitiveType (for example
>>> UMLPrimitiveType::Boolean). There only seems to be a eProxyURI to get
>>> at.
>>>
>>> I tried using the UMLProfile tutorial. I get the error
>>> "java.net.MalformedURLException: unknown protocol: pathmap" when I try
>>> to retrieve this.
>>>
>>> Here is the code:
>>>
>>> Model umlLibrary = (Model)
>>>
>> fileManager.load(URI.createURI(UMLResource.UML_PRIMITIVE_TYP ES_LIBRARY_URI))
>> ;
>>> Package load(URI uri)
>>> {
>>> Package package_ = null;
>>> package_ = (Package) EcoreUtil.getObjectByType(resource.getContents(),
>>> UMLPackage.Literals.PACKAGE);
>>> return package_;
>>> }
>>>
>>> Thanks,
>>> Andrew.
>>
|
|
|
Re: UMLPrimitiveTyes [message #621536 is a reply to message #473176] |
Tue, 12 June 2007 09:26 |
Andrew Carton Messages: 104 Registered: July 2009 |
Senior Member |
|
|
Hi Kenn,
Thanks for the response.
I'm currently using eclipse. Below is the piece of code I am using taken
from the UML2 Migration guide that is used to register the explicit
path. How would I register these with the URIConverter using the
extension points?
Thanks,
Andrew.
URI umlResourcePluginURI = URI
..createURI(" jar:file:/Users/cartona/eclipse/plugins/org.eclipse.uml2.uml .resources_2.1.0.v200705171545.jar!/ ");
URIConverter.URI_MAP.put(URI.createURI(UMLResource.LIBRARIES _PATHMAP),
umlResourcePluginURI.appendSegment("libraries").appendSegment(
""));
URIConverter.URI_MAP.put(URI.createURI(UMLResource.METAMODEL S_PATHMAP),
umlResourcePluginURI.appendSegment("metamodels").appendSegment(
""));
URIConverter.URI_MAP.put(URI.createURI(UMLResource.PROFILES_ PATHMAP),
umlResourcePluginURI.appendSegment("profiles")
.appendSegment(""));
Ar 12/06/2007 01:29, Scríobh Kenn Hussey:
> Andrew,
>
> When running in Eclipse, this is done automatically via an extension point.
> If your application needs to run stand-alone, you can always pass the path
> of the resources plug-in in as an argument...
>
> Kenn
>
> "Andrew Carton" <cartona@cs.tcd.ie> wrote in message
> news:f4kfnn$sda$1@build.eclipse.org...
>> Thanks James, that worked. I specified the URI explicitly with the
>> jar:file/path_to_uml_resources!/ etc but is there not another way of doing
>> this. I don't really like to hardcode a library path into my code..
>>
>> Thanks very much again,
>>
>> Andrew.
>>
>>
>> James Bruck wrote:
>>> Hi Andrew,
>>>
>>> It sounds like you are not registering your pathmaps with the
>>> URIConverter
>>> correctly.
>>> There is an example in the Migration Guide ( toward the bottom ), link
>>> from
>>> UML wiki.
>>> Have a look there and if you still have issues, please ask again.
>>>
>>> - James.
>>>
>>> "Andrew Carton" <cartona@cs.tcd.ie> wrote in message
>>> news:f4f6p5$vnj$1@build.eclipse.org...
>>>> Hi,
>>>>
>>>> I'm trying to read a UML file and transform the UMLPrimitiveTypes into
>>>> other types defined by another profile. I can not figure out how to
>>>> compare an element to a UMLPrimitiveType (for example
>>>> UMLPrimitiveType::Boolean). There only seems to be a eProxyURI to get
>>>> at.
>>>>
>>>> I tried using the UMLProfile tutorial. I get the error
>>>> "java.net.MalformedURLException: unknown protocol: pathmap" when I try
>>>> to retrieve this.
>>>>
>>>> Here is the code:
>>>>
>>>> Model umlLibrary = (Model)
>>>>
>>> fileManager.load(URI.createURI(UMLResource.UML_PRIMITIVE_TYP ES_LIBRARY_URI))
>>> ;
>>>> Package load(URI uri)
>>>> {
>>>> Package package_ = null;
>>>> package_ = (Package) EcoreUtil.getObjectByType(resource.getContents(),
>>>> UMLPackage.Literals.PACKAGE);
>>>> return package_;
>>>> }
>>>>
>>>> Thanks,
>>>> Andrew.
>
|
|
| |
Goto Forum:
Current Time: Sat Apr 27 07:03:47 GMT 2024
Powered by FUDForum. Page generated in 0.03063 seconds
|