|Re: Creating EClass by EClass [message #1705675 is a reply to message #1705666]
||Tue, 18 August 2015 09:43
| Ed Willink
Registered: July 2009
I think you need to start again expressing your requirement without any
ambiguity. At present you seem confused and so we are even more so.
It is obvious to Ed M and me that EcoreUtil.copy does what you need.
However your original question was:
"I have a meta model that was build from XML description. I need to
create a clone of a eclass"
EcoreUtil.copy normally creates copies/clones of EClass instances. Not
of EClasses, although at a different meta-level an ECLass is an EObject
so it can also be cloned.
Why/how is your metamodel build from XML? We normally load a metamodel
and also load models. Do you mean that load an XML model and infer the
What "eclass" do you want to clone? Do you really want to modify the
Whatever the answers, EcoreUtil.copy and friends does it; you just need
to understand what metalevel you are thinking about.
On 18/08/2015 10:01, Ed Merks wrote:
> I'm having a hard time parsing your commentary, but seeing no question
> mark, I assume there is no question in this commentary. Is there still
> a question?
> On 18/08/2015 10:10 AM, Alex Gor wrote:
>> But in Java I work with reference to object, so if I get created from
>> XML instance of eClass and modify, I will have the modified copy.
>> Actually I need to have two instances of the same eClass, one of them
>> will be modified and used with particular way.
Powered by FUDForum
. Page generated in 0.06742 seconds