12

I'm on about my sixth version of Eclipse now, but I've never been able to work out how to add a button to the toolbar.
For example, by default I have a little "open type" button in the Java perspective, and I would like to add an "open type hierarchy" button right next to it. Both functions are available right next to each other on the Navigate menu, and I would simply like to drag one of them onto a toolbar as well.

Doesn't seem so far fetched to me? I've tried the "customize perspective" by right-clicking the toolbars, but to no avail. I seem to be able to add stuff that I don't want. Any ideas? I happen to be using Eclipse 3.4.2 M20081224-0800, but I've never gotten anywhere with this in multiple versions.

Thank you.

Sumit Singh
  • 15,743
  • 6
  • 59
  • 89
Josh
  • 4,894
  • 6
  • 34
  • 42

3 Answers3

6

The trick with "Customize perspective" is that only reflects 'plugin.xml' org.eclipse.ui.commands contribution points.

In other word, you can activate/deactivate those extension points, not change them.

As described in this message (for another button):

As far as I know, the so-called 'basic' toolbar cannot be configured by the user.

I think there are 2 ways to add the 'save all' button:

  • write a plug-in that adds a new toolbar section containing the 'save all' button
  • patch the plug-in 'org.eclipse.ui.ide': in the class WorkbenchActionBuilder insert the following line after the line # 374 (if you want it to appear between 'save' and 'print'):
fileToolBar.add(saveAllAction);

Eclipse3.5 might have changed that, though.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

There is a button called external tools button in the new eclipse Helios toolbar It is easy to customize. I use it for run ant build by single click I guess it will useful try it

0

There must be a way as the old GWT plugin had both the "new web application" and the "compile" buttons on the toolbar.

The latest version they are off by default.

Kris
  • 963
  • 1
  • 13
  • 22