Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » adding combinations of UML elements
adding combinations of UML elements [message #477238] Fri, 11 April 2008 19:48 Go to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

hi,

I've added some code that allows me to add standard combinations of UML
elements to the model (from the component diagram). An example combination
is 2 components connected with a connector with relevant ports and
interfaces. The definitions of these combinations is described in code. So
if i want to add combinations I have to add code. I want a system that
allows me to somehow add definitions of combinations automatically (via a
user interface instead of code). I was thinking of some kind of XML
definition. But of course this is not necessary because this already
exists - the uml files. I can use a .uml file as a definition of a
combination and load the definitions in some how.

So as a starting point. If I have two files. a.uml and b.uml, and i'm
working with b.uml. How can i, in code, add the contents of a.uml to a.uml?

Can anyone tell me how to do something like this? and also where existing
code exists that does something like this. There must be some similar code
because the uml files have to be loaded and updated etc.

regards,
Nick
Re: adding combinations of UML elements [message #477244 is a reply to message #477238] Mon, 14 April 2008 14:39 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nick,

You might want to have a look at the UMLUtil.PackageMerger, or possibly
EcoreUtil.Copier.

Also, you mention in your question:
" An example combination is 2 components connected with a connector with
relevant ports and interfaces" .
Components cannot be connected with a connector directly. I think you mean
that you were creating connectors between parts typed by components?
Components are not ConnectableElement(s).

Cheers,
-James.


"nick kirtley" <nickkirtley@gmail.com> wrote in message
news:8334402805fbcd93f7cbe19bd16f9e83$1@www.eclipse.org...
> hi,
>
> I've added some code that allows me to add standard combinations of UML
> elements to the model (from the component diagram). An example combination
> is 2 components connected with a connector with relevant ports and
> interfaces. The definitions of these combinations is described in code. So
> if i want to add combinations I have to add code. I want a system that
> allows me to somehow add definitions of combinations automatically (via a
> user interface instead of code). I was thinking of some kind of XML
> definition. But of course this is not necessary because this already
> exists - the uml files. I can use a .uml file as a definition of a
> combination and load the definitions in some how.
> So as a starting point. If I have two files. a.uml and b.uml, and i'm
> working with b.uml. How can i, in code, add the contents of a.uml to
> a.uml?
>
> Can anyone tell me how to do something like this? and also where existing
> code exists that does something like this. There must be some similar code
> because the uml files have to be loaded and updated etc.
> regards,
> Nick
>
Re: adding combinations of UML elements [message #477249 is a reply to message #477244] Mon, 14 April 2008 17:23 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

hi, yes I meant connector between ports and ports owned by component.

Thanks for the suggestion. I'm sure I'll have some more questions soon ;)

regards,
Nick
Re: adding combinations of UML elements [message #626401 is a reply to message #477238] Mon, 14 April 2008 14:39 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nick,

You might want to have a look at the UMLUtil.PackageMerger, or possibly
EcoreUtil.Copier.

Also, you mention in your question:
" An example combination is 2 components connected with a connector with
relevant ports and interfaces" .
Components cannot be connected with a connector directly. I think you mean
that you were creating connectors between parts typed by components?
Components are not ConnectableElement(s).

Cheers,
-James.


"nick kirtley" <nickkirtley@gmail.com> wrote in message
news:8334402805fbcd93f7cbe19bd16f9e83$1@www.eclipse.org...
> hi,
>
> I've added some code that allows me to add standard combinations of UML
> elements to the model (from the component diagram). An example combination
> is 2 components connected with a connector with relevant ports and
> interfaces. The definitions of these combinations is described in code. So
> if i want to add combinations I have to add code. I want a system that
> allows me to somehow add definitions of combinations automatically (via a
> user interface instead of code). I was thinking of some kind of XML
> definition. But of course this is not necessary because this already
> exists - the uml files. I can use a .uml file as a definition of a
> combination and load the definitions in some how.
> So as a starting point. If I have two files. a.uml and b.uml, and i'm
> working with b.uml. How can i, in code, add the contents of a.uml to
> a.uml?
>
> Can anyone tell me how to do something like this? and also where existing
> code exists that does something like this. There must be some similar code
> because the uml files have to be loaded and updated etc.
> regards,
> Nick
>
Re: adding combinations of UML elements [message #626406 is a reply to message #477244] Mon, 14 April 2008 17:23 Go to previous message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

hi, yes I meant connector between ports and ports owned by component.

Thanks for the suggestion. I'm sure I'll have some more questions soon ;)

regards,
Nick
Previous Topic:How to use Name Expressions
Next Topic:uml2 v2.2.x to v2.1.x backwards-compatible export?
Goto Forum:
  


Current Time: Thu Apr 25 10:30:53 GMT 2024

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

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

Back to the top