Bug 506130 - Hide Menubar via Menu Entry
Summary: Hide Menubar via Menu Entry
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-18 04:45 EDT by Ulrich Grave CLA
Modified: 2020-12-29 06:18 EST (History)
5 users (show)

See Also:


Attachments
Playing with the menu and toolbar through the model (2.79 MB, video/mp4)
2020-12-29 06:18 EST, Wim Jongman CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Grave CLA 2016-10-18 04:45:55 EDT
There is already an menu entry to hide the toolbar. I would be nice to have this option also for the menu bar. 
If the menu bar is hidden it could be shown via a shourtcut (for example as long the user pressed the ALT key the menu bar is visible, like Sublimetext).
Comment 1 Mchael Pujos CLA 2018-11-26 10:31:44 EST
I'd really like to have the ability to hide the top menu bar.
It could work likle in Firefox and other programs, being shown with Alt when set hidden. Everything else can be hidden (toolbar, statusbar) but not the menu bar.
Use case is to maximize vertical space which is especially useful on laptops.
Speaking of which can it be disabled in a config file or is the functionality simply not there ?
Comment 2 Samir Huremovic CLA 2019-01-24 11:46:26 EST
So i just discovered that if you disable all menu entries while customizing a perspective you can get rid of the main menu, but then the shortcut to show the menu does not work too, which is bad.

In my opinion, CTRL+3 is the best candidate to work with if the main menu is disabled. For example you want to search for a File, where you normally would go to the main menu and select:
Search -> File

Alternative is:
CTRL+3, type "File" and select it.

This works for most menu items that I tried and I actually don't need the Mainmenu anymore.

I still support the idea that the menu should show up when pressing ALT, because that's something that works in other applications already and some people might like that better.
Comment 3 Mchael Pujos CLA 2019-01-24 12:03:24 EST
@2

I knew about this solution (and using CTRL-3 to access to hidden menu entries), but it would be less of a hassle to have a proper toggle for hiding/showing the menu like the rest of UI elements (toolbar/status bar).
Comment 4 emil viorel diaconescu CLA 2020-12-28 10:25:34 EST
any news on this?
Comment 5 Wim Jongman CLA 2020-12-29 04:18:30 EST
(In reply to emil viorel diaconescu from comment #4)
> any news on this?

Would you mind taking a stab at this Emil?
Comment 6 Thomas Wolf CLA 2020-12-29 04:32:54 EST
Just be aware that on OS X the menu bar is different. It's global; not in the application window, and Eclipse on OS X should not even have this function.
Comment 7 Wim Jongman CLA 2020-12-29 05:05:06 EST
(In reply to Thomas Wolf from comment #6)
> Just be aware that on OS X the menu bar is different. It's global; not in
> the application window, and Eclipse on OS X should not even have this
> function.

Right. IIRC, on OSX, the main menu can already be dynamically hidden via the system preferences.
Comment 8 Wim Jongman CLA 2020-12-29 06:18:28 EST
Created attachment 285126 [details]
Playing with the menu and toolbar through the model

## Analysis
When the model spy is installed from the marketplace, you can play with the model. Specifically, you can flip the "visible/to be rendered" flags.

For example, you can observe what happens when the toolbar is hidden and shown.

By working with the model spy to flip off the "to be rendered" flags, in combination with ALT+F11, you can get a completely full-screen Eclipse.

The repo where to put this code is here [1].
Code that hides the main toolbar is here [2]. You can take this as a starting point.

See the attached movie.

## -clearPersistedState
I ran into trouble when I accidentally flipped the "visible" flag on the main window. When this happens, you have to restart with -clearPersistedState

## Tests
When I tried to hide my main menu on my running Eclipse, it did not work. I had to flip the "to be rendered" button on the main menu a couple of times.

I could not get it back at some point, and I had to open a new window via CTRL+F3. After closing my previous window, the "to be rendered" toggle worked as expected.




[1] https://git.eclipse.org/c/platform/eclipse.platform.ui.git
[2] https://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/bundles/org.eclipse.ui.workbench/Eclipse%20UI/org/eclipse/ui/internal/handlers/ToggleCoolbarHandler.java