Copy-Paste: which kind of ID? [message #215482] |
Fri, 16 January 2009 12: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 #215686 is a reply to message #215562] |
Sat, 17 January 2009 09:57 |
Eclipse User |
|
|
|
Originally posted by: thugcee.gmail.com
Alex Shatalin pisze:
> override ResourceImpl.useUUID to return true. For the boolean and enum
> This is AFAIK the only think you have to do to make copy/paste working
> properly now. So, if you find any other problems with C/P (if you have
> useUUID property enabled for your domain and diagram models) - file a
> bugzilla request with the detailed description.
C/P copies only elements from the notation model. The newly created Node
is linked to the original semantic element. Is this expected behavior?
If so, the Paste command should be renamed to "Paste Link" or something
like this, to not confuse users.
greetings,
Seweryn Niemiec
|
|
|
|
Powered by
FUDForum. Page generated in 0.03510 seconds