Amalgamate Models [message #382206] |
Fri, 23 May 2008 10:04  |
Eclipse User |
|
|
|
Originally posted by: zhengxie.ie.ibm.com
I have two uml models, model1 and model2. I need to add all the elements
in model2 into model1, so that the new model1 has all the elements of
model1 and model2. How can I do it?
Thanks.
|
|
|
|
|
Re: Amalgamate Models [message #382211 is a reply to message #382208] |
Wed, 28 May 2008 09:47  |
Eclipse User |
|
|
|
Hi Zheng,
For a general "copy" method you can have a look at EcoreUtil.copy(EObject
eObject).
The UMLUtil PackageMerger uses this to copy elements.
Alternatively have a look UML2Util.getAllContents() to get the contents of
one object. A defensive copy of the contents can be made.
Cheers,
- James.
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:g195bt$ct7$1@build.eclipse.org...
> Zheng,
>
> Please use the UML newsgroup, which I've added to the "to" list of the
> reply, for questions about UML.
>
>
> Zheng Xie wrote:
>> Zheng Xie wrote:
>>> I have two uml models, model1 and model2. I need to add all the elements
>>> in model2 into model1, so that the new model1 has all the elements of
>>> model1 and model2. How can I do it?
>>>
>>>
>>> Thanks.
>> Basicly, what I did is:
>>
>> find all the Packages in model2 and add them to model1's
>> packagedElements.
>>
>> The problem is:
>> The applied stereotypes are lost.
|
|
|
Re: Amalgamate Models [message #607531 is a reply to message #382206] |
Fri, 23 May 2008 10:47  |
Eclipse User |
|
|
|
Originally posted by: zhengxie.ie.ibm.com
Zheng Xie wrote:
> I have two uml models, model1 and model2. I need to add all the elements
> in model2 into model1, so that the new model1 has all the elements of
> model1 and model2. How can I do it?
>
>
> Thanks.
Basicly, what I did is:
find all the Packages in model2 and add them to model1's packagedElements.
The problem is:
The applied stereotypes are lost.
|
|
|
Re: Amalgamate Models [message #607532 is a reply to message #382207] |
Sat, 24 May 2008 09:33  |
Eclipse User |
|
|
|
Zheng,
Please use the UML newsgroup, which I've added to the "to" list of the
reply, for questions about UML.
Zheng Xie wrote:
> Zheng Xie wrote:
>> I have two uml models, model1 and model2. I need to add all the
>> elements in model2 into model1, so that the new model1 has all the
>> elements of model1 and model2. How can I do it?
>>
>>
>> Thanks.
> Basicly, what I did is:
>
> find all the Packages in model2 and add them to model1's
> packagedElements.
>
> The problem is:
> The applied stereotypes are lost.
|
|
|
Re: Amalgamate Models [message #607535 is a reply to message #382208] |
Wed, 28 May 2008 09:47  |
Eclipse User |
|
|
|
Hi Zheng,
For a general "copy" method you can have a look at EcoreUtil.copy(EObject
eObject).
The UMLUtil PackageMerger uses this to copy elements.
Alternatively have a look UML2Util.getAllContents() to get the contents of
one object. A defensive copy of the contents can be made.
Cheers,
- James.
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:g195bt$ct7$1@build.eclipse.org...
> Zheng,
>
> Please use the UML newsgroup, which I've added to the "to" list of the
> reply, for questions about UML.
>
>
> Zheng Xie wrote:
>> Zheng Xie wrote:
>>> I have two uml models, model1 and model2. I need to add all the elements
>>> in model2 into model1, so that the new model1 has all the elements of
>>> model1 and model2. How can I do it?
>>>
>>>
>>> Thanks.
>> Basicly, what I did is:
>>
>> find all the Packages in model2 and add them to model1's
>> packagedElements.
>>
>> The problem is:
>> The applied stereotypes are lost.
|
|
|
Powered by
FUDForum. Page generated in 0.03756 seconds