Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Dynamic menus
Dynamic menus [message #327060] Tue, 08 April 2008 07:09 Go to next message
Eclipse UserFriend
Originally posted by: matthieucguard-ikariam.yahoo.fr

Hi,

I'm developping an RCP application and I don't understand the
commandParameter item under the org.eclipse.ui.commands extension point.
I tried to follow the problem view example but my dynamic menu remains
grayed.

Can someone help me?
Re: Dynamic menus [message #327076 is a reply to message #327060] Tue, 08 April 2008 16:51 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

A command definition can specify the command takes a parameter.
showView is like that, you can execute the showView command with an ID.

A keybinding or org.eclipse.ui.menus command can specify a parameter to
execute with ... for example ALT+SHIFT+Q C is showView(id=Console)
(pseudo-code).

parameters have no impact on the enabled/disable state of the command,
however.

How are you creating your "dynamic menu"? How are you instantiating a
command with a parameter?

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Re: Dynamic menus [message #327133 is a reply to message #327076] Fri, 11 April 2008 09:17 Go to previous message
Eclipse UserFriend
Originally posted by: matthieucguard-ikariam.yahoo.fr

Thanks a lot for your help.
The problem came from the name of the parameter that was false.

Paul Webster wrote:

> A command definition can specify the command takes a parameter.
> showView is like that, you can execute the showView command with an ID.

> A keybinding or org.eclipse.ui.menus command can specify a parameter to
> execute with ... for example ALT+SHIFT+Q C is showView(id=Console)
> (pseudo-code).

> parameters have no impact on the enabled/disable state of the command,
> however.

> How are you creating your "dynamic menu"? How are you instantiating a
> command with a parameter?

> PW
Previous Topic:Delegating Drag and Drop, bug 10146
Next Topic:org.apache.tools.ant.Task#getProject() returns null in custom ant task when called from within JUnit
Goto Forum:
  


Current Time: Fri Nov 08 23:29:49 GMT 2024

Powered by FUDForum. Page generated in 0.02846 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top