use of com.intellij.util.ui.VcsBackgroundTask in project intellij-community by JetBrains.
the class HgVFSListener method performMoveRename.
@Override
protected void performMoveRename(List<MovedFileInfo> movedFiles) {
(new VcsBackgroundTask<MovedFileInfo>(myProject, HgVcsMessages.message("hg4idea.move.progress"), VcsConfiguration.getInstance(myProject).getAddRemoveOption(), movedFiles) {
protected void process(final MovedFileInfo file) throws VcsException {
final FilePath source = VcsUtil.getFilePath(file.myOldPath);
final FilePath target = VcsUtil.getFilePath(file.myNewPath);
VirtualFile sourceRoot = VcsUtil.getVcsRootFor(myProject, source);
VirtualFile targetRoot = VcsUtil.getVcsRootFor(myProject, target);
if (sourceRoot != null && targetRoot != null) {
(new HgMoveCommand(myProject)).execute(new HgFile(sourceRoot, source), new HgFile(targetRoot, target));
}
dirtyScopeManager.fileDirty(source);
dirtyScopeManager.fileDirty(target);
}
}).queue();
}
Aggregations