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/JavaAddElementFromHistory.java
public JavaAddElementFromHistory() {
	}
	
	public void run(IAction action) {
		
		String errorTitle= CompareMessages.getString("AddFromHistory.title"); 
		String errorMessage= CompareMessages.getString("AddFromHistory.internalErrorMessage"); 
		
		Shell shell= JavaPlugin.getActiveWorkbenchShell();
		
		
		ICompilationUnit cu= null;
		IParent parent= null;
		IMember input= null;
		
		
		ISelection selection= getSelection();
		if (selection.isEmpty()) {
			
			if (fEditor != null) {
				IEditorInput editorInput= fEditor.getEditorInput();
				IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
				if (manager != null) {
					cu= manager.getWorkingCopy(editorInput);
					parent= cu;
				}
			}
		} else {
			input= getEditionElement(selection);
			if (input != null) {