浏览 2576 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2012-04-05
ActionSetRegistry reg = WorkbenchPlugin.getDefault().getActionSetRegistry(); IActionSetDescriptor[] actionSets = reg.getActionSets(); // removing annoying gotoLastPosition Message. String actionSetId = "org.eclipse.ui.edit.text.actionSet.navigation"; //$NON-NLS-1$ String annotationNavigationId = "org.eclipse.ui.edit.text.actionSet.annotationNavigation"; //$NON-NLS-1$ for (int i = 0; i <actionSets.length; i++) { //System.out.println("======="+actionSets[i].getId()); if (!actionSets[i].getId().equals(actionSetId) && !actionSets[i].getId().equals(annotationNavigationId) ) continue; IExtension ext = actionSets[i].getConfigurationElement() .getDeclaringExtension(); reg.removeExtension(ext, new Object[] { actionSets[i] }); } // Removing convert line delimiters menu. actionSetId = "org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"; //$NON-NLS-1$ for (int i = 0; i <actionSets.length; i++) { if (!actionSets[i].getId().equals(actionSetId)) continue; IExtension ext = actionSets[i].getConfigurationElement() .getDeclaringExtension(); reg.removeExtension(ext, new Object[] { actionSets[i] }); } 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |