Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Contributing drop down actions to a view
Contributing drop down actions to a view [message #335651] Sat, 18 April 2009 23:57 Go to next message
Eclipse UserFriend
Originally posted by: m.sched.gmx.at

Hi!

I'm using the org.eclipse.ui.viewActions extension point to add a custom
action to the console (org.eclipse.ui.console.ConsoleView). This works fine
as long as my action is a simple push action, but now I want to change it to
a dropdown action (like the console selection actions). The menu must be
generated by my code when it is opened.

Since "Display Selected Console" and "Open Console" do this, I'm assuming
it's possible, but I can't figure out how. The style attribute of viewer
contribution actions only accepts "push", "radio" or "toggle" values.

I've been toying around with "org.eclipse.ui.actionSets", but that seems to
apply to the workbench's own toolbars only, not that of a specific view.

Any pointers?

Thx,
Marian.

--
http://www.musgit.com | http://marian.musgit.com
http://www.amerlingchor.at

Hofstadter's law: "It always takes longer than you think,
even when you take account of Hofstadter's law".
Re: Contributing drop down actions to a view [message #335662 is a reply to message #335651] Mon, 20 April 2009 14:38 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

The buttons that already work as you want are contributed
programmatically be the view ... as you've seen you can't add them using
o.e.ui.viewActions.

You can using org.eclipse.ui.menus (and commands and handlers) See some
of the examples in http://wiki.eclipse.org/Menu_Contributions

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/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:Rich Text Editor to manage "two-way editing"
Next Topic:using fragments for version-specific features
Goto Forum:
  


Current Time: Fri Apr 26 13:21:41 GMT 2024

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

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

Back to the top