如何从 Eclipse RCP 应用程序中删除未使用的视图
我有一个带有一组视图的 RCP 应用程序,我不需要诸如 Debug/* 视图或 Team/* 视图之类的视图。如何从“窗口”->“显示视图”->“其他”对话框中删除它们?
我在这里找到了一个带有visibleWhen属性的解决方案,但我需要禁用不是我的项目。
有人可以帮助我吗? 谢谢
I have a RCP application with a set of my views and i needn't such views as Debug/* views or Team/* views. How can i remove them from Window->SHow view->Other dialog?
I found here a solution with visibleWhen attribute, but i need to disable not mine items.
Could anyone help me?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保不出现不需要的视图的最佳方法是从 RCP 应用程序中删除贡献插件。据推测,如果您不希望显示调试视图,则不需要任何 debug.ui 功能。因此,在我看来,您应该从应用程序中删除该插件。
The best way to ensure that unwanted views do not appear, is to remove the contributing plugins from your RCP app. Presumably, if you don't want the debug view to appear, then you don't need any debug.ui functionality. So, it seems to me that you should be removing that plugin from your app.
安德鲁是正确的,如果你不需要额外的视图,你可以删除提供视图的插件。
另一方面,如果您需要视图但不希望可以从 UI 中轻松使用它,您还可以使用活动的概念来有选择地隐藏任何 ui 贡献。
请参阅http://www.vogella.de/blog/2009/ 07/13/eclipse-activities/ 了解如何使用它们的详细信息
Andrew is correct, if you don't need the extra view, you can just remove the plugin that contributes the view.
On the other hand, if you need the view but don't want it to be readily available from the UI, you can also use the concept of activities to selectively hide any ui contributions.
please see http://www.vogella.de/blog/2009/07/13/eclipse-activities/ for details on how to use them