Remove view name from Eclipse menu Window -> Show View - eclipse

I need to remove the name/shortcut of the view which I have created from the Window->Show View menu and add them as a separate menu.
Is there any way to hide/remove its entry from Window->Show View menu.

You can add/remove any view from the "Show View" menu from the Customize Perspective / Menu Visibility tab:
To do the same thing programmatically would imply to follow the same course of action than the class org.eclipse.ui.internal.dialogs.CustomizePerspectiveDialog, and look into the method okPressed() for instance:
perspective.setShowViewActionIds(menu.getCheckedItemIds());
Vlad Ilie mentions in the comments:
as I only needed for the View to be completely inaccessible via usual GUI, activities were enough for me as per this blog post "eEclipse Activities – Hide / Display certain UI elements":
This would mean that programmatically the WorkbenchActivitySupport.setEnabledActivityIds(String[]) method can be used to enable or disable views after they've been introduced into an activity.

I would suggest you to go to window->Preferences or customize perspective. I think this is place from where we can controls the menu's to be displayed.

Related

VS Code - toggle search icon in Activity Bar, move from panel or back

I accidentally removed search icon in Activity Bar and don't know how to add it there again. If I click on Activity Bar, I don't see this option any more.
Update: v1.44 you can now simply drag many of the views, including "Search" from the sidebar to the panel and back. See https://code.visualstudio.com/updates/v1_44#_increased-view-placement-flexibility and https://stackoverflow.com/a/55981465/836330
Update: v1.42 added a context menu option
Move to Panel/Move to Sidebar
to certain typically sidebar views like Search, Outline and custom views. So you wouldn't have to use a setting to move the Search view back to the sidebar. Here is a demo:
Also notice that you no longer right-click in the empty space below the search inputs in the sidebar but on/near the Search header itself to bring up the toggle option.
As part of the v1.42 release the search.location setting mentioned below will be deprecated.
Your setting should migrate automatically, but you will need to use
the new generalized method to move the Search view going forward. You
do not need to enable the experimental preview setting above in order
to move the Search view with the new context menu entry.
So I don't think there is a setting anymore, you just right-click on the header text "Search" whether it is in the Panel or active in the Sidebar to move it. See the demo below.
Right-click on the "Search" header if you have it in the sidebar to "Move to Panel".
If Search is in the panel, right-click on the word Search to "Move to Sidebar".
To enable moving the Output view at this point, you need to enable workbench.view.experimental.allowMovingToNewContainer.
There is a new unbound command workbench.view.search.moveView which you can use to toggle the search position between the panel and sidebar. But note that in my testing it only works a couple of times because it focuses the panel when you move search to the sidebar - I'll file a bug.
Previous Answer::
You may have modified the setting:
"search.location": "sidebar",
which is the default to the alternative
"search.location": "panel",
which would put the search widget into the terminal panel as another tab.
As of vscode v1.35 or so, you can now right-click in the empty space below the search view (i.e., in the sidebar under the open search inputs) and you will get an option to Toggle Search View Position.
This context menu switch of the search view is persistent. It will automatically add this setting to your settings.json:
"search.location": "panel",
The only way at present (but see edit just below) to move the icon back to the activity bar (and thus the search across files functionality to the sidebar) is to change that setting to the sidebar option. Or look for this setting in the settings editor:
Search: Location
Controls whether the search will be shown as a view
in the sidebar or as a panel in the panel area for more horizontal
space.
EDIT: More recently, vscode added the abilty to right-click in the search area when it is in the panel to toggle it back to the sidebar.
In windows
file--> preferences-->settings
In mac
preferences -> settings
vs-code version 1.30.2
Step 1: Click on Edit from Navbar
Step 2: Find in Files
.
.
You can easily search for anything in the side paanel
or else if you want anything to search inside files then
Step 1: Click "Ctrl+F"

Customize Eclipse process console tool bar

I want to rearrange the tool bar buttons for Eclipse console and remove some items. Is this possible? Customizing the main menu bar and tool bar for the entire application can be done easily.
I'd like access to both the View action and Context menu options.
The Console View does not permit this.

Eclipse Juno: Can't find fast view bar

Version: Eclipse 4.2 Codename: Juno
I don't see a fast view bar in eclipse 4.2. I can't rightclick on a view and enable fast view. The fast view options under General -> Perspectives does nothing.
Was the fast view feature removed or am I missing something?
I've looked up at http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-9b.htm , but that didn't help either.
The single Fast view bar has been replaced by minimized stacks. Now you simply drag your views into one stack and then minimize it.
I have created a request to get back the original behavior (from platform 3.x):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=385105
Vote for it if you are equally interested.
It is bit tricky read the documentation properly search for fast view bar in the eclipse documentation. in General -> Perspective area set the radio button to fast view and enable hide empty fast view bar. after opening the navigator minimize the navigator now reopen the navigator and click esc it should be working..
If you are missing the views previous located in the fast view?
Use the "Quick Access" search field to find the views.
(located in the top bar to the left of perspective views: Java, Debug etc.)
To view all, click spacebar.
Just open a New Window: main menu | Window | New Window
The Perspective switching bar will be recovered for the new window and you can close the original window.

Hide Eclipse Menu Bar (auto-hide)

I'm trying to hide Eclipse menu bar to save some screen real estate. I found I can do this using perspectives but that would permanently take out the menu from that perspective. The behavior that I want to get is something along of auto-hide, so that the menu remains hidden until I hit ALT+F for example or any other ALT key combo.
Is there's a setting or a plugin that can do this?
Thanks!
This is just a work around. Create two perspectives.
First one named - With Menu.
Second one named - Without Menu.
In the "Without Menu" perspective remove all menu items and Save.
To create the effect of hiding and showing, switch between perspectives by using
Ctrl+F8.
Theres a fast view option- just right click the tab and select Fast View. It'll bring the entire window down to the eclipse taskbar. You can recover the window by just clicking on it's icon.
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=56119
Have a look here Is there a Macro Recorder for Eclipse? You could set up the macro so respond to ALT+F possibly.

Can an eclipse view contribute to the application menu?

I'm creating a simple eclipse application which will contain only views. I've chosen to use only views so users can arrange and stack their views however they like (since editors and views cannot be stacked together). There also isn't any need for a traditional "editor" and I don't want the editor space always showing. But, enough about my decision to use only views.
I was wondering if there is a way for a view to contribute to the main menu for the application? For example, can switching views cause the main application menu to change?
You can use the org.eclipse.ui.menus extension point and set your command to only be visible when the view is active.