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
}
			if (lines == null) {
				MessageDialog.openError(shell, errorTitle, errorMessage);
				return;
			}
			
			
			MemberEdit edit= null;
			if (input != null)
				edit= new MemberEdit(input, MemberEdit.INSERT_AFTER, lines,
										CodeFormatterPreferencePage.getTabSize());
			else
				edit= createEdit(lines, parent);
			if (edit == null) {
				MessageDialog.openError(shell, errorTitle, errorMessage);
				return;
			}
			edit.setAddLineSeparators(false);
			
			IProgressMonitor nullProgressMonitor= new NullProgressMonitor();
			TextBufferEditor editor= new TextBufferEditor(buffer);
			editor.add(edit);
			editor.performEdits(nullProgressMonitor);
			
			final TextBuffer bb= buffer;
			IRunnableWithProgress r= new IRunnableWithProgress() {
				public void run(IProgressMonitor pm) throws InvocationTargetException {
					try {
						TextBuffer.commitChanges(bb, false, pm);
					} catch (CoreException ex) {