Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How does DeleteAction works in Network example?
How does DeleteAction works in Network example? [message #118493] Thu, 19 February 2004 21:18
Eclipse UserFriend
Originally posted by: yong.dong.sympatico.ca

In NetworkEditor.createActions(), the DeleteAction is added, but it is
always disabled.
When I create a ContextMenuProvdier, and in buildContextMenu Method,

action = getActionRegistry().getAction(IWorkbenchActionConstants.DELE TE);
if (action.isEnabled())
manager.appendToGroup(GEFActionConstants.GROUP_EDIT, action);

I found action.isEnabled() always return false;

In ScrollingGraphicalViewer.fireSelectionChange(), the DeleteAction does
refresh() to
setEnabled(calculateEnabled()),

In calculateEnabled(), the command is created, but the
cmd.canExecute() always return False, even though I select the Node in the
Viewer and I also can
see the selection in debugger. This causes the DeleteAction to be always
disabled.

Any idea can fix it? Thanks a lot.

Michael
Previous Topic:adding labels to edit parts.
Next Topic:Image Icon
Goto Forum:
  


Current Time: Sat Jul 27 12:26:32 GMT 2024

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

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

Back to the top