[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: implementing cut/copy/paste
|
- From: Jesper Eskilson <jojo@xxxxxxxxxxxx>
- Date: Mon, 29 Nov 2004 13:27:51 +0100
- Cancel-lock: sha1:iCT/KCL1aXTg2SIceuJ3j3uTL5g=
- Newsgroups: eclipse.tools.gef
- Organization: EclipseCorner
- User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)
"Pratik Shah" <ppshah@xxxxxxxxxx> writes:
> Yes, you'll have to write your own actions (in addition to the retarget
> actions that you've already created) and add them to your Editor's
> actionRegistry. Make sure these actions have the same IDs as the retarget
> actions.
The copy-action is now called properly, but I can't get a hold of the
selection. getSelectedObjects() returns the empty list.
My editor's createActions() looks like this:
protected void createActions()
{
super.createActions();
IActionBars bars = getEditorSite().getActionBars();
ActionRegistry registry = getActionRegistry();
IAction action;
action = new CopyAction(this);
registry.registerAction(action);
bars.setGlobalActionHandler(CopyAction.ID, action);
[...]
}
I've tried following the logic-example, but to no avail.
--
/Jesper