Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Model import and referencing
Model import and referencing [message #473320] Wed, 27 June 2007 12:31 Go to next message
Eclipse UserFriend
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 20:05 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
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 20:36 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
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 20:05 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
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 20:36 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
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
>
>
Previous Topic:question about package merge
Next Topic:[Announce] MDT UML2 2.0.4 M200707041607 is available
Goto Forum:
  


Current Time: Thu Mar 28 16:28:19 GMT 2024

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

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

Back to the top