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 19:57 Go to next message
Eclipse User
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 10:38 Go to previous message
Paul Webster is currently offline Paul Webster
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: Mon Sep 01 07:41:18 EDT 2014

Powered by FUDForum. Page generated in 0.01969 seconds