开发者

Remove view name from Eclipse menu Window -> Show View

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:

Remove view name from Eclipse menu Window -> Show View


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜