Bug 17423 Revert apears twice in the popup menu.
Build F1. 1) Open a java editor. 2) Popup the menu. There is only one Revert option disable as it should be. 3) Make the editor dirty. 4) Popup the menu. There are two Revert option in the menu. One after UNDO and other before FORMAT.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
/*
	 * @see JavaEditor#getCorrespondingElement(IJavaElement)
	 */
	protected IJavaElement getCorrespondingElement(IJavaElement element) {
		try {
			return EditorUtility.getWorkingCopy(element, true);
		} catch (JavaModelException x) {
			
		}
		return null;
	}
	
	/*
	 * @see AbstractTextEditor#editorContextMenuAboutToShow(IMenuManager)
	 */
	public void editorContextMenuAboutToShow(IMenuManager menu) {
		super.editorContextMenuAboutToShow(menu);		
		
		addActionIfEnabled(menu, ITextEditorActionConstants.GROUP_EDIT,  ITextEditorActionConstants.REVERT_TO_SAVED);
		addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Format"); 
				
		ActionContext context= new ActionContext(getSelectionProvider().getSelection());
		fContextMenuGroup.setContext(context);
		fContextMenuGroup.fillContextMenu(menu);
		fContextMenuGroup.setContext(null);
	}
	
	private void addActionIfEnabled(IMenuManager menu, String group, String actionId) {
	 	IAction action= getAction(actionId);
	 	if (action != null) {