Skip to main content



      Home
Home » Modeling » UML2 Tools » Referring to classes in other models/packages
Referring to classes in other models/packages [message #476307] Wed, 04 February 2009 15:24 Go to next message
Eclipse UserFriend
Assume someone gives me a UML model M1 containing package P1 which in
turn contains class C1. I create UML model M2 containing package P2
which in turn contains class C2. Is there a way I can get something
representing C1 onto my class diagram so that I can draw a
generalization relationship from C2 to C1 without redefining C1?

Is the answer different if M1 is part of a UML Library or a Profile (if
that is possible)?

John Colgrave
Re: Referring to classes in other models/packages [message #476310 is a reply to message #476307] Fri, 06 February 2009 04:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi John,

You can get a graphical representation of element C1 in the diagram of the
package owning element C2 using shortcuts:
http://wiki.eclipse.org/GMF_Tutorial_Part_2

If the model M1, and M2 are different resources (I mean you are referring
to two diferent uml models and not two instances of the UML element
"model") you'll also have to use LoadResource (RightClick in the canvas)
to "import" model M1 into M2.

Cheers!

Salva.
Re: Referring to classes in other models/packages [message #476311 is a reply to message #476310] Fri, 06 February 2009 07:39 Go to previous message
Eclipse UserFriend
Salva wrote:
> Hi John,
>
> You can get a graphical representation of element C1 in the diagram of
> the package owning element C2 using shortcuts:
> http://wiki.eclipse.org/GMF_Tutorial_Part_2

Hi Salva,

Thanks for this pointer, it is exactly what I was looking for.

> If the model M1, and M2 are different resources (I mean you are
> referring to two diferent uml models and not two instances of the UML
> element "model") you'll also have to use LoadResource (RightClick in the
> canvas) to "import" model M1 into M2.

I did this the first time but the second time I tried just doing the
shortcut (with different models) and it seemed to work just as well
withoug having to load the resource first. I am using multiple .uml and
..umlclass files in the same project.

Thanks again, John
Re: Referring to classes in other models/packages [message #623542 is a reply to message #476307] Fri, 06 February 2009 04:56 Go to previous message
Eclipse UserFriend
Hi John,

You can get a graphical representation of element C1 in the diagram of the
package owning element C2 using shortcuts:
http://wiki.eclipse.org/GMF_Tutorial_Part_2

If the model M1, and M2 are different resources (I mean you are referring
to two diferent uml models and not two instances of the UML element
"model") you'll also have to use LoadResource (RightClick in the canvas)
to "import" model M1 into M2.

Cheers!

Salva.
Re: Referring to classes in other models/packages [message #623544 is a reply to message #476310] Fri, 06 February 2009 07:39 Go to previous message
Eclipse UserFriend
Salva wrote:
> Hi John,
>
> You can get a graphical representation of element C1 in the diagram of
> the package owning element C2 using shortcuts:
> http://wiki.eclipse.org/GMF_Tutorial_Part_2

Hi Salva,

Thanks for this pointer, it is exactly what I was looking for.

> If the model M1, and M2 are different resources (I mean you are
> referring to two diferent uml models and not two instances of the UML
> element "model") you'll also have to use LoadResource (RightClick in the
> canvas) to "import" model M1 into M2.

I did this the first time but the second time I tried just doing the
shortcut (with different models) and it seemed to work just as well
withoug having to load the resource first. I am using multiple .uml and
..umlclass files in the same project.

Thanks again, John
Previous Topic:Access to UML Primitive Types
Next Topic:Initial Model Object
Goto Forum:
  


Current Time: Wed Jul 23 14:20:28 EDT 2025

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

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

Back to the top