Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Copy-Paste: which kind of ID?
Copy-Paste: which kind of ID? [message #215482] Fri, 16 January 2009 12:20 Go to next message
Eclipse UserFriend
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 #215562 is a reply to message #215482] Fri, 16 January 2009 16:47 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello tobias,

> 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.

-----------------
Alex Shatalin
Re: Copy-Paste: which kind of ID? [message #215686 is a reply to message #215562] Sat, 17 January 2009 09:57 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Copy-Paste: which kind of ID? [message #216570 is a reply to message #215686] Wed, 28 January 2009 12:39 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
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
Previous Topic:A simple question
Next Topic:Custom property editor for EDataTypes
Goto Forum:
  


Current Time: Mon Mar 08 10:12:59 GMT 2021

Powered by FUDForum. Page generated in 0.01848 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top