Copy-Paste: which kind of ID? [message #215482] |
Fri, 16 January 2009 07:20  |
Eclipse User |
|
|
|
Originally posted by: tobk42.gmx.de
Hello,
I'm struggling quite heavily with copy and paste right now. I've taken
a look at the STP-BPMN-Editor, which provides copy-paste, but I was not
able to apply the approach to my own editor (see the thread from
yesterday). Whatever I try, in the paste-part the node has no semantic
element (later, the original element or the root element is associated
with the node, or a null pointer exception occurs, depending on the
implementation of the clipboard support I use).
Currently I'm pretty sure that the problem is related to which kind of
IDs is used in the domain model.
I've created a small test project, and here copy-paste works if the
xmi:id of the element to copy is set (but for some reason it is not set
by default). However, in my main project (the one I want to have
copy-paste working for) all the elements have the xmi:id attribute set,
so there must be something more. Both in the STP-BPMN editor and in my
editor there is another ID-attribute (named "id" in mine and "iD" in the
STP editor). Might this be (part of) the cause? Further, both my project
and the STP editor have the resource type set to XML, override
ResourceImpl.useUUID to return true. For the boolean and enum fields,
the genmodel files both look exactly the same. Are there any other
relevant settings in the genmodel, gmfgen, or plugin.xml?
I would be really, really glad if your could point me to some definite
and up to date documentation.
Regards,
Tobias
|
|
|
|
|
Re: Copy-Paste: which kind of ID? [message #216570 is a reply to message #215686] |
Wed, 28 January 2009 07:39  |
Eclipse User |
|
|
|
Hello Seweryn,
AFAIK new instance of the selected notation + domain model elements with
all children should be created on paste command.. So, to my understanding
this is an incorrect behaviour. We are going to fully generated copy/paste
functionality in future, so we’ll re-implement this part of framework and
probably improve the quality. The only question is – “when?”…
-----------------
Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.24380 seconds