论坛首页 Java企业应用论坛

如何去掉 Last Edit Location next annotation previous annotation

浏览 2573 次
精华帖 (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] });
	    }
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics