Bug 565767 - Cannot undo a copy resource action

Change-Id: I6a14a41d03e89b3689be7ec74a522faa24d1c61a
Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java
index 40d494a..6329ad2 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java
@@ -1259,7 +1259,8 @@
 			// the same undo history and therefore a redo cannot be properly
 			// done. Just execute it directly so it won't be added to the undo
 			// history.
-			op.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(messageShell));
+			PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op, monitor,
+					WorkspaceUndoUtil.getUIInfoAdapter(messageShell));
 		} catch (ExecutionException e) {
 			if (e.getCause() instanceof CoreException) {
 				recordError((CoreException) e.getCause());
@@ -1315,7 +1316,8 @@
 			// the same undo history and therefore a redo cannot be properly
 			// done. Just execute it directly so it won't be added to the undo
 			// history.
-			op.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(messageShell));
+			PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op, monitor,
+					WorkspaceUndoUtil.getUIInfoAdapter(messageShell));
 		} catch (ExecutionException e) {
 			if (e.getCause() instanceof CoreException) {
 				recordError((CoreException) e.getCause());