From: Bruno Sinou Date: Tue, 19 Mar 2013 14:39:38 +0000 (+0000) Subject: fix bug 145 ( https://www.argeo.org/bugzilla/show_bug.cgi?id=145 ). X-Git-Tag: argeo-commons-2.1.30~676 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=dede1b96fcc760d72229569259cea81bfe367f55;p=lgpl%2Fargeo-commons.git fix bug 145 ( https://argeo.org/bugzilla/show_bug.cgi?id=145 ). git-svn-id: https://svn.argeo.org/commons/trunk@6167 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/base/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/utils/CommandUtils.java b/base/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/utils/CommandUtils.java index e020ecf3e..8b7658626 100644 --- a/base/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/utils/CommandUtils.java +++ b/base/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/ui/utils/CommandUtils.java @@ -171,6 +171,8 @@ public class CommandUtils { Command cmd = cmdService.getCommand(commandID); ArrayList parameters = null; + ParameterizedCommand pc; + if (paramMap != null) { // Set parameters of the command to launch : parameters = new ArrayList(); @@ -181,10 +183,12 @@ public class CommandUtils { cmd.getParameter(id), paramMap.get(id)); parameters.add(parameterization); } - } - // build the parameterized command - ParameterizedCommand pc = new ParameterizedCommand(cmd, - parameters.toArray(new Parameterization[parameters.size()])); + pc = new ParameterizedCommand(cmd, + parameters.toArray(new Parameterization[parameters + .size()])); + } else + pc = new ParameterizedCommand(cmd, null); + // execute the command handlerService.executeCommand(pc, null); } catch (Exception e) {