Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Pulldown toolbar contributions for editors.
Pulldown toolbar contributions for editors. [message #322921] Mon, 03 December 2007 07:10 Go to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig20533D76613AD1E3252946EF
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,

We've been using regular buttons as editor contributions. We'd like to
consolidate some such contributions into a dropdown.

Is there some extension point that lets me contribute pulldowns on the
toolbar for *editors* ?

Any pointers to code snippets would be cool.

Cheers,
Ketan Padegaonkar
I blog... therefore I am... http://ketan.padegaonkar.name/

The farther you go, the less you know.
-- Lao Tsu, "Tao Te Ching"


--------------enig20533D76613AD1E3252946EF
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHU6vj50uB2zvyE8MRAlwKAJ9ohG65yacIOLiD89poDCjIYkunLgCf RFe7
ir2g5Vwxc6PQSMt5VMaB2Gs=
=d/Hn
-----END PGP SIGNATURE-----

--------------enig20533D76613AD1E3252946EF--
Re: Pulldown toolbar contributions for editors. [message #322938 is a reply to message #322921] Mon, 03 December 2007 15:19 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

No, although I think there is an open bug for it:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205164

You might have to both set pulldown as the style and implement
IActionDelegate2 so you can set the IMenuCreator on the incoming action.

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: Pulldown toolbar contributions for editors. [message #322971 is a reply to message #322921] Tue, 04 December 2007 07:45 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Ketan Padegaonkar wrote:

>Hi,
>
>We've been using regular buttons as editor contributions. We'd like to
>consolidate some such contributions into a dropdown.
>
>Is there some extension point that lets me contribute pulldowns on the
>toolbar for *editors* ?
>
>
First of all, there is no special/local tool bar for editors like there
is for views. The stuff ends up in the global tool bar. The text editor
for example contributes the Next/Previous Annotation as pull-down using
the org.eclipse.ui.actionSets extension point. For details see:
/org.eclipse.ui.editors/plugin.xml

Dani

>Any pointers to code snippets would be cool.
>
>Cheers,
>Ketan Padegaonkar
>I blog... therefore I am... http://ketan.padegaonkar.name/
>
>The farther you go, the less you know.
> -- Lao Tsu, "Tao Te Ching"
>
>
>
Re: Pulldown toolbar contributions for editors. [message #322973 is a reply to message #322971] Tue, 04 December 2007 07:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: velganesh.subramanian.iflexsolutions.com

Dani,

Can you please exaplain why there is no local toolbar for editors? I have
an RCP wherein the form I use in an editor uses a toolbar accessed through
IToolBarManager tbm = form.getToolBarManager(). Isn't this toolbar local
to the editor?
Re: Pulldown toolbar contributions for editors. [message #322976 is a reply to message #322973] Tue, 04 December 2007 07:59 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Vel wrote:

> Dani,
>
> Can you please exaplain why there is no local toolbar for editors? I
> have an RCP wherein the form I use in an editor uses a toolbar
> accessed through IToolBarManager tbm = form.getToolBarManager(). Isn't
> this toolbar local to the editor?
>
Maybe forms support this but the normal workbench layout doesn't.

Dani
Re: Pulldown toolbar contributions for editors. [message #322994 is a reply to message #322973] Tue, 04 December 2007 14:43 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Vel wrote:
> Dani,
>
> Can you please exaplain why there is no local toolbar for editors? I
> have an RCP wherein the form I use in an editor uses a toolbar accessed
> through IToolBarManager tbm = form.getToolBarManager(). Isn't this
> toolbar local to the editor?
>

As Dani mentioned, that is part of org.eclipse.ui.forms support (not one
of the workbench toolbars). You can create an SWT toolbar anywhere you
want, really. You just have to populate it yourself.

In 3.3 you can populate an arbitrary ToolBarManager using
org.eclipse.ui.menus extension point, if you wanted to make it
extensible. You would define a unique ID for that menu (ex:
my.view.id.form.toolbar) and then call
IMenuService#populateContributionManager(myToolbarManager,
"toolbar:my.view.id.form.toolbar")

you would need to call releaseContributions(*) in your dispose() method.

Later,
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: Pulldown toolbar contributions for editors. [message #325365 is a reply to message #322971] Fri, 15 February 2008 15:14 Go to previous message
Mircea Luchian is currently offline Mircea LuchianFriend
Messages: 89
Registered: July 2009
Member
Hi,

I came with the same problem. Consolidating actions with a pulldown and
enabeling it for a specific editor is impossible. The "pulldown" style
for an editor action does not exist. This would be a nice to have
feature in a future version of Eclipse (3.4, 4.0). What do you think?

Thanks,

Mircea



Daniel Megert wrote:
> Ketan Padegaonkar wrote:
>
>> Hi,
>>
>> We've been using regular buttons as editor contributions. We'd like to
>> consolidate some such contributions into a dropdown.
>>
>> Is there some extension point that lets me contribute pulldowns on the
>> toolbar for *editors* ?
>>
>>
> First of all, there is no special/local tool bar for editors like
> there is for views. The stuff ends up in the global tool bar. The text
> editor for example contributes the Next/Previous Annotation as
> pull-down using the org.eclipse.ui.actionSets extension point. For
> details see: /org.eclipse.ui.editors/plugin.xml
>
> Dani
>
>> Any pointers to code snippets would be cool.
>>
>> Cheers,
>> Ketan Padegaonkar
>> I blog... therefore I am... http://ketan.padegaonkar.name/
>>
>> The farther you go, the less you know.
>> -- Lao Tsu, "Tao Te Ching"
>>
>>
>>
Previous Topic:disable new wizards with activities
Next Topic:Problem with launching RCP application on eclipse 3.3
Goto Forum:
  


Current Time: Thu Apr 25 07:26:36 GMT 2024

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

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

Back to the top