Bug 162805 [Undo] [IDE] Navigator Undo happens in UI thread with no progress
Build: I20061030-1200 Perform a large copy in a project that takes a few seconds to run Edit > Undo Copy Resources Edit > Redo Copy Resources The "redo" happens in the UI thread so the application stops painting (on Vista the window turns white). This should happen in a modal context thread. 4XESTACKTRACE at org/eclipse/core/internal/resources/Resource.copy(Resource.java:482) 4XESTACKTRACE at org/eclipse/ui/ide/undo/WorkspaceUndoUtil.copy(WorkspaceUndoUtil.java:327) 4XESTACKTRACE at org/eclipse/ui/ide/undo/CopyResourcesOperation.copy(CopyResourcesOperation.java:157) 4XESTACKTRACE at org/eclipse/ui/ide/undo/CopyResourcesOperation.doExecute(CopyResourcesOperation.java:125) 4XESTACKTRACE at org/eclipse/ui/ide/undo/AbstractWorkspaceOperation$2.run(AbstractWorkspaceOperation.java:250) 4XESTACKTRACE at org/eclipse/core/internal/resources/Workspace.run(Workspace.java:1742(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/ide/undo/AbstractWorkspaceOperation.redo(AbstractWorkspaceOperation.java:248) 4XESTACKTRACE at org/eclipse/core/commands/operations/DefaultOperationHistory.doRedo(DefaultOperationHistory.java:353) 4XESTACKTRACE at org/eclipse/core/commands/operations/DefaultOperationHistory.redo(DefaultOperationHistory.java:1095) 4XESTACKTRACE at org/eclipse/ui/operations/RedoActionHandler.runCommand(RedoActionHandler.java:64) 4XESTACKTRACE at org/eclipse/ui/operations/OperationHistoryActionHandler$4.run(OperationHistoryActionHandler.java:280) 4XESTACKTRACE at org/eclipse/jface/operation/ModalContext.runInCurrentThread(ModalContext.java:369) 4XESTACKTRACE at org/eclipse/jface/operation/ModalContext.run(ModalContext.java:313) 4XESTACKTRACE at org/eclipse/jface/dialogs/ProgressMonitorDialog.run(ProgressMonitorDialog.java:479) 4XESTACKTRACE at org/eclipse/ui/internal/operations/TimeTriggeredProgressMonitorDialog.access$6(TimeTriggeredProgressMonitorDialog.java:1) 4XESTACKTRACE at org/eclipse/ui/internal/operations/TimeTriggeredProgressMonitorDialog$2.run(TimeTriggeredProgressMonitorDialog.java:203) 4XESTACKTRACE at org/eclipse/swt/custom/BusyIndicator.showWhile(BusyIndicator.java:67(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/internal/operations/TimeTriggeredProgressMonitorDialog.run(TimeTriggeredProgressMonitorDialog.java:216) 4XESTACKTRACE at org/eclipse/ui/operations/OperationHistoryActionHandler.run(OperationHistoryActionHandler.java:290) 4XESTACKTRACE at org/eclipse/jface/action/Action.runWithEvent(Action.java:499) 4XESTACKTRACE at org/eclipse/ui/actions/RetargetAction.runWithEvent(RetargetAction.java:229) 4XESTACKTRACE at org/eclipse/jface/action/ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) 4XESTACKTRACE at org/eclipse/jface/action/ActionContributionItem.access$2(ActionContributionItem.java:488) 4XESTACKTRACE at org/eclipse/jface/action/ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) 4XESTACKTRACE at org/eclipse/swt/widgets/EventTable.sendEvent(EventTable.java:66(Compiled Code)) 4XESTACKTRACE at org/eclipse/swt/widgets/Widget.sendEvent(Widget.java:925(Compiled Code)) 4XESTACKTRACE at org/eclipse/swt/widgets/Display.runDeferredEvents(Display.java:3455(Compiled Code)) 4XESTACKTRACE at org/eclipse/swt/widgets/Display.readAndDispatch(Display.java:3072(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/internal/Workbench.runEventLoop(Workbench.java:1924)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java
.findMember(destinationPath));
						for (int j = 0; j < deleted.length; j++) {
							overwrittenResources.add(deleted[j]);
						}
					}
				} else {
					
					
					IPath parentPath = destination;
					if (pathIncludesName) {
						parentPath = destination.removeLastSegments(1);
					}
					IContainer generatedParent = generateContainers(parentPath);
					source.copy(destinationPath, IResource.SHALLOW,
							new SubProgressMonitor(monitor, 1));
					
					
					if (generatedParent == null) {
						resourcesAtDestination.add(getWorkspace().getRoot()
								.findMember(destinationPath));
					} else {
						resourcesAtDestination.add(generatedParent);
					}
				}
				if (monitor.isCanceled()) {
					throw new OperationCanceledException();
				}
			}
		}
		return (ResourceDescription[]) overwrittenResources