Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Copy/paste
Copy/paste [message #151895] Fri, 24 September 2004 07:48 Go to next message
Antony is currently offline AntonyFriend
Messages: 34
Registered: July 2009
Member
Hi everybody!

Like many diagrams, mine should give me the possibility to copy one or
more blocks selected from the canvas and to paste them in the same diagram
or ni others. After a lot of research, I found that GEF doesn't support
native copy/paste (the Logic Example seems to implement it with the
CloneCommand, but it doesn't work!), so I tried to create it by myself.
But I'm not so able in such kind of things, in fact I made a mess.

The strategy I applied is that the GroupCopy action puts every selected
block in a list and then in the Clipboard, and the GroupPaste takes the
contents of the clipboard and iterates the list to paste the blocks. But
how do I paste them in relation of the mouse' position? Why doesn't it
work when I try to paste inside other diagrams? And how can I select again
the pasted blocks automatically, in order to move them all once created?

Many thanks,

Antony
Re: Copy/paste [message #151965 is a reply to message #151895] Fri, 24 September 2004 18:04 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Copy and paste is a purely model-based operation. GEF is model-agnostic, so
it's the applications responsibility. The could be anywhere when paste
action is invoked.

"Antony" <antonymist@hotmail.com> wrote in message
news:cj0jfv$dtp$1@eclipse.org...
> Hi everybody!
>
> Like many diagrams, mine should give me the possibility to copy one or
> more blocks selected from the canvas and to paste them in the same diagram
> or ni others. After a lot of research, I found that GEF doesn't support
> native copy/paste (the Logic Example seems to implement it with the
> CloneCommand, but it doesn't work!), so I tried to create it by myself.
> But I'm not so able in such kind of things, in fact I made a mess.
>
> The strategy I applied is that the GroupCopy action puts every selected
> block in a list and then in the Clipboard, and the GroupPaste takes the
> contents of the clipboard and iterates the list to paste the blocks. But
> how do I paste them in relation of the mouse' position? Why doesn't it
> work when I try to paste inside other diagrams? And how can I select again
> the pasted blocks automatically, in order to move them all once created?
>
> Many thanks,
>
> Antony
>
Previous Topic:Text filing
Next Topic:GEF Logc Example Drag n drop
Goto Forum:
  


Current Time: Fri Apr 26 07:40:09 GMT 2024

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

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

Back to the top