adding combinations of UML elements [message #477238] |
Fri, 11 April 2008 19:48 |
Eclipse User |
|
|
|
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 |
james bruck 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 #626401 is a reply to message #477238] |
Mon, 14 April 2008 14:39 |
james bruck 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
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03579 seconds