Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » The standard 'Select all' command doesn't work
The standard 'Select all' command doesn't work [message #1276363] Mon, 24 March 2014 13:05
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
I have a TableViewer within my View and I would like to use the org.eclipse.ui.edit.selectAll command to select all rows using the standard Ctrl+A shortcut.

When I put tracing on I can see the HandlerAuthority class resolves some conflicts and the output looks like this:

HANDLERS >>> Command('org.eclipse.ui.edit.selectAll') has changed to 'org.eclipse.ui.internal.handlers.SelectAllHandler' as its handler
HANDLERS >>>     resolveConflicts: eval: HandlerActivation(commandId=org.eclipse.ui.edit.selectAll,
    handler=org.eclipse.ui.internal.handlers.SelectAllHandler@2a3e58,
    expression=,sourcePriority=0)
HANDLERS >>> Resolved conflict detected.  The following activation won: 
HANDLERS >>>     HandlerActivation(commandId=org.eclipse.ui.edit.selectAll,
    handler=org.eclipse.ui.internal.handlers.SelectAllHandler@2a3e58,
    expression=,sourcePriority=0)
HANDLERS >>>     resolveConflicts: eval: HandlerActivation(commandId=org.eclipse.ui.edit.selectAll,
    handler=org.eclipse.ui.internal.handlers.SelectAllHandler@2a3e58,
    expression=,sourcePriority=0)
HANDLERS >>> Resolved conflict detected.  The following activation won: 
HANDLERS >>>     HandlerActivation(commandId=org.eclipse.ui.edit.selectAll,
    handler=org.eclipse.ui.internal.handlers.SelectAllHandler@2a3e58,
    expression=,sourcePriority=0)
HANDLERS >>>     resolveConflicts: eval: HandlerActivation(commandId=org.eclipse.ui.edit.selectAll,
    handler=ActionHandler(RetargetAction(selectAll)),
    expression=ActiveShellExpression(Shell {SPL v0.1.2 (VYVOJ) (DB TEST)}),sourcePriority=17408)
HANDLERS >>>     resolveConflicts: eval: HandlerActivation(commandId=org.eclipse.ui.edit.selectAll,
    handler=org.eclipse.ui.internal.handlers.SelectAllHandler@2a3e58,
    expression=,sourcePriority=0)
HANDLERS >>> Resolved conflict detected.  The following activation won: 
HANDLERS >>>     HandlerActivation(commandId=org.eclipse.ui.edit.selectAll,
    handler=ActionHandler(RetargetAction(selectAll)),
    expression=ActiveShellExpression(Shell {SPL v0.1.2 (VYVOJ) (DB TEST)}),sourcePriority=17408)
HANDLERS >>> Command('org.eclipse.ui.edit.selectAll') has changed to 'ActionHandler(RetargetAction(selectAll))' as its handler

When I press Ctrl+A I can see:
KEYS >>> Listener.handleEvent(type = KeyDown, stateMask = 0x0, keyCode = 0x40000, time = 9403459, character = 0x0)
    KEYS >>> Listener.handleEvent(type = KeyDown, stateMask = 0x40000, keyCode = 0x61, time = 9403553, character = 0x1)
    KEYS >>> WorkbenchKeyboard.press(potentialKeyStrokes = [CTRL+A])
    KEYS >>> WorkbenchKeyboard.executeCommand(commandId = 'org.eclipse.ui.edit.selectAll', parameters = {})
    KEYS >>>     not handled

Debugging the RetargetAction I found that the Action is not handled because it has no handler set.

So my question is, why the HandlerAuthority sets an RetargetAction as a handler for the org.eclipse.ui.edit.selectAll command? I would like to use the default one (org.eclipse.ui.internal.handlers.SelectAllHandler).
Previous Topic: Persist selection on tree viewer on restart of application using memento
Next Topic:RCP 3.x app: Command Parameters not passed to command after app export!!
Goto Forum:
  


Current Time: Thu Mar 28 08:45:47 GMT 2024

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

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

Back to the top