21

The toolbar is of no use for me, it occupies space, I use shortcuts to achieve all functions the toolbar provide. In Eclipse 3.7 we can right click the toolbar and hit "hide toolbar", but how to do that in Eclipse 4?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Mike
  • 3,515
  • 10
  • 44
  • 67

7 Answers7

15

Menu was gone but the command seems to be available still now.
Preferences > General > Keys
Type "toggle t" in filter text, then "Toggle Toolbar Visibility" will appear. It seems to work when some key is assigned.

atlanto
  • 1,601
  • 1
  • 11
  • 10
  • 3
    Awesome, actually i type "toggle toolbar" in quick access box and press enter, the toolbar disappear, including the quick access box--just what i need. Thank you. – Mike Jul 13 '12 at 03:37
12

> Window > Hide Toolbar

(I'm running 4.2.1.)

Luke Usherwood
  • 3,082
  • 1
  • 28
  • 35
1

In 4.7.2 you can use the menu items: Window -> Appearance -> Hide Toolbar & Window -> Appearance -> Show Toolbar to toggle toolbar visibility.

Stefano Mozart
  • 1,191
  • 10
  • 11
1

In 4.9.0 you can open Window > Perspective > Customize Perspective via the top menu. Here you can either hide a complete tool bar group and even show/hide single icons. Me, I reduced it to show only one single line of symbols, so that I have more space for the editors below.

The Customize Perspective function has been introduced long time ago in Eclipse, so I guess it is available for your version.

enter image description here

tangoal
  • 724
  • 1
  • 9
  • 28
0

You can do it programatically like this:

@Override
public void postWindowOpen() {
    hideCoolbar();
    super.postWindowOpen();
}

private void hideCoolbar() {
    try {
        IHandlerService service = (IHandlerService) PlatformUI
                .getWorkbench().getActiveWorkbenchWindow()
                .getService(IHandlerService.class);
        if (service != null)
            service.executeCommand("org.eclipse.ui.ToggleCoolbarAction",
                    null);
    } catch (Exception e) {
        //handle error
    }
}
Phaedrus
  • 487
  • 7
  • 15
-1

Not sure if this will work, but why dont you take a look at this.

Hide Coolbar/Toolbar items/Preference pages in Eclipse RCP application (Eclipse e4)

Community
  • 1
  • 1
Eric Sauer
  • 870
  • 4
  • 14
  • 27
-1
WorkbenchWindow w = (WorkbenchWindow)HandlerUtil
     .getActiveSite(event)
     .getWorkbenchWindow();
w.setPerspectiveBarVisible(false);
Kenster
  • 23,465
  • 21
  • 80
  • 106
Naveen
  • 67
  • 9