Community
Participate
Working Groups
An IAction with style AS_CHECK_BOX does not toggle the checked state when the accelerator keycode is entered. Tried working around this by keeping track of the checked state myself but the accelerator does not appear to call the run() or run(IAction) methods. How does the accelerator fire the action?
Reassigning to Platform-UI-Inbox (I left IBM 18 months ago..)
Moving Dougs bugs
Assigning to component owner PW
Do you have some sample code to reproduce this? I'm having some trouble constructing a proper snippet myself.
This code works either including the accelerator in the label or setting it on the action: MenuManager file = new MenuManager("&File", "file"); manager.add(file); Action a = new Action("&Hello\tCTRL+H", IAction.AS_CHECK_BOX) { public void runWithEvent(Event event) { System.out.println("runWithEvent: " + getText()); } }; // a.setAccelerator(SWT.CONTROL|'H'); file.add(a); CTRL+H both calls the run method and updates the checked state. PW