Bug 17699 Java Editor: Local Histroy menu entries are enabled for read-only files
F1 - make file read-only - open it - observe: context menu contains Local History actions. Only compare makes sense for read-only files
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareWithEditionAction.java
if (file == null) {
			MessageDialog.openError(shell, errorTitle, errorMessage);
			return;
		}
		
		boolean inEditor= beingEdited(file);
		if (inEditor)
			input= (IMember) getWorkingCopy(input);
		
		TextBuffer buffer= null;
		try {
			buffer= TextBuffer.acquire(file);
			ITypedElement target= new JavaTextBufferNode(buffer, inEditor);
			ITypedElement[] editions= buildEditions(target, file);
			ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME);
			EditionSelectionDialog d= new EditionSelectionDialog(shell, bundle);
			d.setCompareMode(true);
			d.setEditionTitleImage(JavaCompareUtilities.getImage(input));
			d.selectEdition(target, editions, input);
						
		} catch(CoreException ex) {
			JavaPlugin.log(ex);
			MessageDialog.openError(shell, errorTitle, errorMessage);
		} finally {
			if (buffer != null)
				TextBuffer.release(buffer);
		}
	}
}