Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Programmatically adding a command to a tool item

Hi Kai,

On Fri, Mar 23, 2012 at 7:47 AM, Toedter, Kai <kai.toedter@xxxxxxxxxxx> wrote:

Hi All,

 

I am currently making last preparations for EclipseCon. To get my personal MinMax Addon running I need to bind a command to a tool item (with a parameter). Here is my source:

 

MCommand command = MCommandsFactory.INSTANCE.createCommand();

command.setElementId("com.toedter.e4.ui.workbench.addons.minmax.restore");

command.setCommandName("Restore Stack");

command.setDescription("xxx");

command.setContributorURI("kai");


You need to use command.getParameters() to add the matching MCommandParameter definition.
 

 

// application.getCommands().add(command);


I assume you are adding the command and handler to the application, right?
 

Later,
PW


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

Back to the top