Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Copy and paste in gef
Copy and paste in gef [message #228727] Mon, 08 January 2007 16:22 Go to next message
Eclipse UserFriend
Originally posted by:

Having trouble with copy and paste in gef. I found a thread where somebody
was having the same problem as me, but the resolution he was helped with
doesn't make sense or work for me. Here is what he and I have

In our GraphicalEditor...
public void init(IEditorSite site, IEditorInput input)
throws PartInitException
super.init(site, input);
ActionRegistry registry = getActionRegistry();
IActionBars bars = site.getActionBars();
String id = ActionFactory.COPY.getId();
bars.setGlobalActionHandler(id, registry


public void createActions()
SCEGefCopyAction copy=new SCEGefCopyAction(this);
ActionRegistry registry = getActionRegistry();


The commented out line is the one they told him to add and it fixed his
problem. I made my action extend IPartListener and just make anything in
there cause it to setEnabled(true) but I cannot get the copy menu to turn
from being greyed out to enabled. Also my calculateEnabled function never
even gets called so I know I am doing something wrong here. Does anyone
know what i am missing?
Re: Copy and paste in gef [message #228734 is a reply to message #228727] Mon, 08 January 2007 16:25 Go to previous message
Eclipse UserFriend
Originally posted by:

Oh I meant to mention, I am using a Multi page editor with a text editor
as another tab which might be related since it also has a copy action.
Previous Topic:Context Sensitive help for AbstractGraphicalEditPart
Next Topic:Two Editors should share the same outline
Goto Forum:

Current Time: Thu Nov 26 12:30:54 GMT 2015

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

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