Bug 108162 [Progress] [IDE] Deadlock using MoveFilesAndFoldersOperation from a refactoring participant
We provide a Resource Move refactoring participant for resources managed by our plug-in. The following line of code in the participant causes the deadlock: new MoveFilesAndFoldersOperation(<the active shell>).copyResources(<some resources>, <destination container>); The MoveFilesAndFoldersOperation class is from the "org.eclipse.ui.actions" package.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/WorkspaceModifyOperation.java
try {
            IWorkspaceRunnable workspaceRunnable = new IWorkspaceRunnable() {
                public void run(IProgressMonitor pm) throws CoreException {
                    try {
                        execute(pm);
                    } catch (InvocationTargetException e) {
                        
                        iteHolder[0] = e;
                    } catch (InterruptedException e) {
                        
                        
                        throw new OperationCanceledException(e.getMessage());
                    }
                    
                }
            };
            IDEWorkbenchPlugin.getPluginWorkspace().run(workspaceRunnable,
                    rule, IResource.NONE, monitor);
        } catch (CoreException e) {
            throw new InvocationTargetException(e);
        } catch (OperationCanceledException e) {
            throw new InterruptedException(e.getMessage());
        }
        
        if (iteHolder[0] != null) {
            throw iteHolder[0];
        }
    }
}