how to clone a model [message #477520] |
Sat, 14 June 2008 14:00  |
Eclipse User |
|
|
|
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
|
|
|
|
|
|
|
Re: how to clone a model [message #477587 is a reply to message #477582] |
Wed, 09 July 2008 07:34  |
Eclipse User |
|
|
|
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
>
|
|
|
Re: how to clone a model [message #626711 is a reply to message #477520] |
Sat, 14 June 2008 14:35  |
Eclipse User |
|
|
|
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
|
|
|
Re: how to clone a model [message #626733 is a reply to message #477521] |
Thu, 19 June 2008 06:47  |
Eclipse User |
|
|
|
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
|
|
|
Re: how to clone a model [message #626775 is a reply to message #477543] |
Tue, 08 July 2008 10:49  |
Eclipse User |
|
|
|
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
|
|
|
Re: how to clone a model [message #626779 is a reply to message #477582] |
Tue, 08 July 2008 20:31  |
Eclipse User |
|
|
|
Hi Krzystof,
Perhaps your question will be answered by this feature enhancement request:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=204658
----Tim----
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
>
|
|
|
Re: how to clone a model [message #626780 is a reply to message #477582] |
Wed, 09 July 2008 07:34  |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.03772 seconds