diff options
author | Paul Webster | 2012-05-03 17:15:48 +0000 |
---|---|---|
committer | Paul Webster | 2012-05-03 17:15:48 +0000 |
commit | aa3fabc57b242fcd960289450fa938b613eae295 (patch) | |
tree | 0a2b17383c1572391176307155914048ccf249c7 /bundles/org.eclipse.e4.core.commands | |
parent | 01e77a96c92d9107b07af5b21d793224e4a23da8 (diff) | |
download | eclipse.platform.ui-aa3fabc57b242fcd960289450fa938b613eae295.tar.gz eclipse.platform.ui-aa3fabc57b242fcd960289450fa938b613eae295.tar.xz eclipse.platform.ui-aa3fabc57b242fcd960289450fa938b613eae295.zip |
Bug 369159 - [Compatibility] ICommandService/IExecutionListener notv20120503-1715
fired
Make sure that bindings refer to the same Commands used by the rest of
the system.
Diffstat (limited to 'bundles/org.eclipse.e4.core.commands')
-rw-r--r-- | bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/CommandServiceAddon.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/CommandServiceAddon.java b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/CommandServiceAddon.java index 5cdb070f2d6..11242cc0786 100644 --- a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/CommandServiceAddon.java +++ b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/CommandServiceAddon.java @@ -27,9 +27,13 @@ public class CommandServiceAddon { @PostConstruct public void init(IEclipseContext context) { // global command service. There can be only one ... per application :-) - CommandManager manager = new CommandManager(); - setCommandFireEvents(manager, false); - context.set(CommandManager.class, manager); + CommandManager manager = context.get(CommandManager.class); + if (manager == null) { + manager = new CommandManager(); + setCommandFireEvents(manager, false); + context.set(CommandManager.class, manager); + } + CommandServiceImpl service = ContextInjectionFactory .make(CommandServiceImpl.class, context); context.set(ECommandService.class, service); |