aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWojciech Sudol2014-04-28 16:47:59 (EDT)
committerPaul Webster2014-04-28 16:53:13 (EDT)
commit585b224d0fc4b52a20cf7feecc8bba960f0f61ef (patch)
tree9114d1f1afc4d40c35a22276b5852bc83badd257
parentb935fef5473f66a281a5b99f7f414207bdeef828 (diff)
downloadeclipse.platform.ui-585b224d0fc4b52a20cf7feecc8bba960f0f61ef.zip
eclipse.platform.ui-585b224d0fc4b52a20cf7feecc8bba960f0f61ef.tar.gz
eclipse.platform.ui-585b224d0fc4b52a20cf7feecc8bba960f0f61ef.tar.bz2
Bug 411326 - Menu entries contributed programmatically disabled inrefs/changes/77/25677/3
eclipse 4.3 Change-Id: I08ae2e350f0cc11739ded12858ba83aba6675ad6 Signed-off-by: Wojciech Sudol <wojciech.sudol@pl.ibm.com>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/CommandProcessingAddon.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/CommandProcessingAddon.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/CommandProcessingAddon.java
index 083d5a0..08a7ff7 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/CommandProcessingAddon.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/CommandProcessingAddon.java
@@ -25,6 +25,7 @@ import org.eclipse.core.commands.IParameter;
import org.eclipse.core.commands.ParameterType;
import org.eclipse.core.commands.common.NotDefinedException;
import org.eclipse.e4.core.commands.ECommandService;
+import org.eclipse.e4.core.commands.internal.HandlerServiceImpl;
import org.eclipse.e4.core.services.events.IEventBroker;
import org.eclipse.e4.ui.internal.workbench.Activator;
import org.eclipse.e4.ui.internal.workbench.Parameter;
@@ -145,6 +146,7 @@ public class CommandProcessingAddon {
private void registerCommandListener() {
cmListener = new ICommandManagerListener() {
+ @SuppressWarnings("restriction")
@Override
public void commandManagerChanged(CommandManagerEvent commandManagerEvent) {
if (commandManagerEvent.isCommandChanged()) {
@@ -155,7 +157,9 @@ public class CommandProcessingAddon {
}
final Command command = commandManagerEvent.getCommandManager().getCommand(
commandId);
-
+ if (command.getHandler() == null) {
+ command.setHandler(HandlerServiceImpl.getHandler(commandId));
+ }
try {
MCategory categoryModel = findCategory(command.getCategory().getId());
final MCommand createdCommand = createCommand(command, modelService,