Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Migrate key preferences to new version of plugin when command ID has changed


On 02/28/2014 05:30 PM, Paul Webster wrote:
Except how is your migration manager able to "see" the old definitions?  You must still have the commands defined, right?  As long as that is true, your best bet is to change their names to "Whatever (deprecated)" and migrate the keybindings.  Then in your next release don't provide the old commands.

re: deleting commands. Commands aren't deleted, but they can be undefined.  After you've removed the Bindings for the commands you want to get rid of, you could try org.eclipse.core.commands.Command.undefine() (I'm not 100% sure of what it'll do though).
Calling undefine() seems to work. It doesn't seem to remove the command from the workbench but internally it sets all command values to null, which let them disappear from the key binding page.

But ... they are defined by the runtime system after reading the extension points.  They can be added back if something causes the system to re-read the extensions.
I don't understand what you mean by re-reading extensions. When I migrate the commands (which means the old commands are replaced by new commands in the pom.xml of the plugin) and remove their values by calling undefine() how can they come back?

PW


--
Paul Webster
Hi floor.  Make me a sammich! - GIR


_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev


Back to the top