这篇文章其实是《Eclipse RCP编辑器关闭按钮的屏蔽方法》的下半部分,之所以没放一起是因为原文很容易引起误解,所以拆开了。
在UnCloseableEditorPresentationFactory类createEditorPresentation()方法中,我们可以定制StandardViewSystemMenu类,从而去掉RCP中编辑器folder上的菜单中的close,closeall,new editor等菜单。
然后在createEditorPresentation()方法中,修改代码如下:
本文介绍如何通过自定义MyStandardEditorSystemMenu类来移除Eclipse RCP编辑器中的某些菜单项,如关闭(close)、全部关闭(close all)及新建编辑器(new editor)等功能。
1089

被折叠的 条评论
为什么被折叠?



