从Eclipse菜单窗口中删除视图名称 - >显示视图 [英] Remove view name from Eclipse menu Window -> Show View

查看:1023
本文介绍了从Eclipse菜单窗口中删除视图名称 - >显示视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从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.

是有任何方法可以从Window-> Show View菜单隐藏/删除其条目。

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:

以同样的方式,程序化地意味着遵循与 org.eclipse.ui.internal.dialogs.CustomizePerspectiveDialog ,并查看方法 okPressed()例如:

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 提到在评论中


因为我只需要查看通过通用GUI完全无法访问,根据本博客文章 eEclipse活动 - 隐藏/显示某些UI元素

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":

这将意味着以编程方式 WorkbenchActivitySupport.setEnabledActivityIds(String [])方法可用于在视图被引入到活动中后启用或禁用视图。

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.

这篇关于从Eclipse菜单窗口中删除视图名称 - >显示视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆