|
|
|
|
|
Re: how to clone a model [message #477587 is a reply to message #477582] |
Wed, 09 July 2008 11:34  |
Ed Merks Messages: 33011 Registered: July 2009 |
Senior Member |
|
|
Krzysztof,
Sorry, I missed your question. I'm not sure where how the stereotype
applications are recorded in the model. It sounds like they aren't
contained though, since copy will only copy the containment tree. You'd
need to use copyAll and copy the model and the referencing stereo types
as a single operation (if that makes any sense; I'm no UML expert).
Krzysztof Kaczmarski wrote:
> Hi Ed,
>
> One mode question concerning model copying.
>
> I do something like this:
>
> Model clonnedModel = (Model) EcoreUtil.copy( model );
>
> And the resulting clonnedModel is ok except for applied stereotypes.
> I debugged the uml files before and after the copying and came to
> conclusion that the source file contains XMI section with stereotype
> applications while the resulting file contains only pure UML tags.
>
> Do you know anything about this problem?
>
> Regards,
> Krzysztof
>
>
>
> Krzysztof Kaczmarski wrote:
>> Thanks.
>> KK
>>
>>
>> Ed Merks wrote:
>>> Krzysztof,
>>>
>>> I expect you'd be able to use EcoreUtil.copy/copyAll.
>>>
>>>
>>> Krzysztof Kaczmarski wrote:
>>>> Hi All,
>>>>
>>>> Perhaps someone could point me to an example showing how to clone
>>>> (deeply) a model created programmatically. Is it possible somehow?
>>>>
>>>> Thanks in advance,
>>>> Krzysztof
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: how to clone a model [message #626711 is a reply to message #477520] |
Sat, 14 June 2008 18:35  |
Ed Merks Messages: 33011 Registered: July 2009 |
Senior Member |
|
|
Krzysztof,
I expect you'd be able to use EcoreUtil.copy/copyAll.
Krzysztof Kaczmarski wrote:
> Hi All,
>
> Perhaps someone could point me to an example showing how to clone
> (deeply) a model created programmatically. Is it possible somehow?
>
> Thanks in advance,
> Krzysztof
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
Re: how to clone a model [message #626780 is a reply to message #477582] |
Wed, 09 July 2008 11:34  |
Ed Merks Messages: 33011 Registered: July 2009 |
Senior Member |
|
|
Krzysztof,
Sorry, I missed your question. I'm not sure where how the stereotype
applications are recorded in the model. It sounds like they aren't
contained though, since copy will only copy the containment tree. You'd
need to use copyAll and copy the model and the referencing stereo types
as a single operation (if that makes any sense; I'm no UML expert).
Krzysztof Kaczmarski wrote:
> Hi Ed,
>
> One mode question concerning model copying.
>
> I do something like this:
>
> Model clonnedModel = (Model) EcoreUtil.copy( model );
>
> And the resulting clonnedModel is ok except for applied stereotypes.
> I debugged the uml files before and after the copying and came to
> conclusion that the source file contains XMI section with stereotype
> applications while the resulting file contains only pure UML tags.
>
> Do you know anything about this problem?
>
> Regards,
> Krzysztof
>
>
>
> Krzysztof Kaczmarski wrote:
>> Thanks.
>> KK
>>
>>
>> Ed Merks wrote:
>>> Krzysztof,
>>>
>>> I expect you'd be able to use EcoreUtil.copy/copyAll.
>>>
>>>
>>> Krzysztof Kaczmarski wrote:
>>>> Hi All,
>>>>
>>>> Perhaps someone could point me to an example showing how to clone
>>>> (deeply) a model created programmatically. Is it possible somehow?
>>>>
>>>> Thanks in advance,
>>>> Krzysztof
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02426 seconds