如何去掉 Last Edit Location next annotation previous annotation
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.getId()); if (!actionSets.getId().equals(actionSetId) &&!actionSets.getId().equals(annotationNavigationId) ) continue; IExtension ext = actionSets.getConfigurationElement() .getDeclaringExtension(); reg.removeExtension(ext, new Object[] { actionSets }); } // 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.getId().equals(actionSetId)) continue; IExtension ext = actionSets.getConfigurationElement() .getDeclaringExtension(); reg.removeExtension(ext, new Object[] { actionSets }); }
页:
[1]