Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] API change in org.eclipse.ui.workbench (commands)


I have just checked to org.eclipse.ui.workbench head to 2 small API changes. These changes are expected to be important post 3.0, when work is done to allow parameters to be passed to commands and their handlers.

1. in IHandler: void execute(Object parameter) has changed to Object execute(Map parameterValuesByName)
2. in ICommand: void execute(Object parameter) has changed to Object execute(Map parameterValuesByName)

This may affect you if you are:
(in case 1) directly handling commands using the new api. esp, to handle commands on dialogs.
in this case, you will only have to alter the method signature of your concrete IHandler instance and make sure to return null. you should be ignoring the parameter.
(in case 2) programatically executing a command.
in this case, you should not have to make a code change as you should be passing null as the parameter anyway.

Thanks,
Chris.

Back to the top