Model import and referencing [message #473320] |
Wed, 27 June 2007 08:31  |
Eclipse User |
|
|
|
Originally posted by: NOSPAM-magnus.rundlof.saabgroup.com-NOSPAM
Hi
I would like to create a library of models that could be included and used
in other models. For example, I have created a model file called
MY_PRIMITIVE_TYPES.uml. Next, I load the resource into a model called
mymodel.uml, the model where I want to use the primitive types. All works
well, as long as I use the UML Editor in Eclipse. However, when an
application loads the model, the type name of all referenced primitive types
are null. The only thing that identifies the type is an eProxyURI.
How can I get this scenario to act as if there was only one model? Is it
possible to make the loader build the model on-the-fly or do I need to
traverse it and fill in the blanks myself? How do I use the eProxyURI?
Very thankful for suggestions.
Best regards,
Magnus
|
|
|
Re: Model import and referencing [message #473440 is a reply to message #473320] |
Wed, 27 June 2007 16:05   |
Eclipse User |
|
|
|
Hi Magnus,
You might need to setup your URI converter to understand pathmap
information.
Have a look at :
http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html#Programmatic%20Migration
at the section entitled Programmatic Migration for some ideas.
You also might want to have a look at
UMLUtil.getEcorePrimitiveTypesLibrary() function to see how to load the
primitive type library into the same resource set as that of your model.
Regards,
- James.
"Magnus Rundlof" <NOSPAM-magnus.rundlof@saabgroup.com-NOSPAM> wrote in
message news:f5tlbv$99j$1@build.eclipse.org...
> Hi
>
> I would like to create a library of models that could be included and used
> in other models. For example, I have created a model file called
> MY_PRIMITIVE_TYPES.uml. Next, I load the resource into a model called
> mymodel.uml, the model where I want to use the primitive types. All works
> well, as long as I use the UML Editor in Eclipse. However, when an
> application loads the model, the type name of all referenced primitive
types
> are null. The only thing that identifies the type is an eProxyURI.
>
> How can I get this scenario to act as if there was only one model? Is it
> possible to make the loader build the model on-the-fly or do I need to
> traverse it and fill in the blanks myself? How do I use the eProxyURI?
>
> Very thankful for suggestions.
>
> Best regards,
> Magnus
>
>
|
|
|
Re: Model import and referencing [message #473653 is a reply to message #473320] |
Wed, 04 July 2007 16:36  |
Eclipse User |
|
|
|
Magnus,
It sounds like the references to the primitive types cannot be resolved.
What do the references look like (in the model file)? Is your application
running within Eclipse or standalone?
Kenn
"Magnus Rundlof" <NOSPAM-magnus.rundlof@saabgroup.com-NOSPAM> wrote in
message news:f5tlbv$99j$1@build.eclipse.org...
> Hi
>
> I would like to create a library of models that could be included and used
> in other models. For example, I have created a model file called
> MY_PRIMITIVE_TYPES.uml. Next, I load the resource into a model called
> mymodel.uml, the model where I want to use the primitive types. All works
> well, as long as I use the UML Editor in Eclipse. However, when an
> application loads the model, the type name of all referenced primitive
> types are null. The only thing that identifies the type is an eProxyURI.
>
> How can I get this scenario to act as if there was only one model? Is it
> possible to make the loader build the model on-the-fly or do I need to
> traverse it and fill in the blanks myself? How do I use the eProxyURI?
>
> Very thankful for suggestions.
>
> Best regards,
> Magnus
>
>
|
|
|
Re: Model import and referencing [message #622653 is a reply to message #473320] |
Wed, 27 June 2007 16:05  |
Eclipse User |
|
|
|
Hi Magnus,
You might need to setup your URI converter to understand pathmap
information.
Have a look at :
http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html#Programmatic%20Migration
at the section entitled Programmatic Migration for some ideas.
You also might want to have a look at
UMLUtil.getEcorePrimitiveTypesLibrary() function to see how to load the
primitive type library into the same resource set as that of your model.
Regards,
- James.
"Magnus Rundlof" <NOSPAM-magnus.rundlof@saabgroup.com-NOSPAM> wrote in
message news:f5tlbv$99j$1@build.eclipse.org...
> Hi
>
> I would like to create a library of models that could be included and used
> in other models. For example, I have created a model file called
> MY_PRIMITIVE_TYPES.uml. Next, I load the resource into a model called
> mymodel.uml, the model where I want to use the primitive types. All works
> well, as long as I use the UML Editor in Eclipse. However, when an
> application loads the model, the type name of all referenced primitive
types
> are null. The only thing that identifies the type is an eProxyURI.
>
> How can I get this scenario to act as if there was only one model? Is it
> possible to make the loader build the model on-the-fly or do I need to
> traverse it and fill in the blanks myself? How do I use the eProxyURI?
>
> Very thankful for suggestions.
>
> Best regards,
> Magnus
>
>
|
|
|
Re: Model import and referencing [message #622725 is a reply to message #473320] |
Wed, 04 July 2007 16:36  |
Eclipse User |
|
|
|
Magnus,
It sounds like the references to the primitive types cannot be resolved.
What do the references look like (in the model file)? Is your application
running within Eclipse or standalone?
Kenn
"Magnus Rundlof" <NOSPAM-magnus.rundlof@saabgroup.com-NOSPAM> wrote in
message news:f5tlbv$99j$1@build.eclipse.org...
> Hi
>
> I would like to create a library of models that could be included and used
> in other models. For example, I have created a model file called
> MY_PRIMITIVE_TYPES.uml. Next, I load the resource into a model called
> mymodel.uml, the model where I want to use the primitive types. All works
> well, as long as I use the UML Editor in Eclipse. However, when an
> application loads the model, the type name of all referenced primitive
> types are null. The only thing that identifies the type is an eProxyURI.
>
> How can I get this scenario to act as if there was only one model? Is it
> possible to make the loader build the model on-the-fly or do I need to
> traverse it and fill in the blanks myself? How do I use the eProxyURI?
>
> Very thankful for suggestions.
>
> Best regards,
> Magnus
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.15238 seconds