Bug 33356 Read Only files: 2 dialogs from 'override methods' [code manipulation]
rc1 1. set a file to read-only 2. open the file in the editor, select an import statement 3. invoke 'override/implement methods' from the context menu 4. error dialog shows up, 'file is read only', press ok 5. second dialog comes up, invalid selection, select type...
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OverrideMethodsAction.java
private boolean checkEnabledEditor() {
		return fEditor != null && SelectionConverter.canOperateOn(fEditor);
	}
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction
	 */
	protected void run(ITextSelection selection) {
		Shell shell= getShell();
		try {
			IType type= SelectionConverter.getTypeAtOffset(fEditor);
			if (type != null && ElementValidator.check(type, getShell(), getDialogTitle(), true))
				run(shell, type, fEditor);
			else
				MessageDialog.openInformation(shell, getDialogTitle(), ActionMessages.getString("OverrideMethodsAction.not_applicable")); 
		} catch (JavaModelException e) {
			JavaPlugin.log(e);
			ExceptionHandler.handle(e, getShell(), getDialogTitle(), null);
		}
	}
	
	
	private void run(Shell shell, IType type, IEditorPart editor) {
		if (!ActionUtil.isProcessable(getShell(), type)) {
			return;
		}
		
		OverrideMethodQuery selectionQuery= new OverrideMethodQuery(shell, false);
		CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
		AddUnimplementedMethodsOperation op= new AddUnimplementedMethodsOperation(type, settings, selectionQuery, false);
		try {