How to use Command and Handler concept for SWT Widget. [message #990598] |
Thu, 13 December 2012 11:40  |
|
I'm creating one RCP in Eclipse 4.2. My question is like for each menu and toolbar we can use command and handler concept is there is any slandered way to use command and handler concept for SWT component of any part.
Like if i have a part in that part i created 1 button and i want to call a command when it'll click. So except executing command inside action, do we have any other way so that like menu we can resister our command for particular button or may be for others widget.
Thanks.
[Updated on: Thu, 13 December 2012 12:07] Report message to a moderator
|
|
|
|
Re: How to use Command and Handler concept for SWT Widget. [message #991021 is a reply to message #990953] |
Mon, 17 December 2012 05:22   |
|
I think your are talking about following.
Command command = iCommandService.getCommand("your command");
final Event trigger = new Event();
ExecutionEvent executionEvent = iHandlerService.createExecutionEvent(command, trigger);
try {
command.executeWithChecks(executionEvent);
} catch (Exception e1) {
e1.printStackTrace();
}
If yes than that i know , What i want is like in case of menu and toolbar we just resister the command . like that is there is any way to do same for button and all in Part GUI.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02173 seconds