use of org.jetbrains.idea.svn.SvnProgressCanceller in project intellij-community by JetBrains.
the class CleanupWorker method run.
@Override
public void run(@NotNull ProgressIndicator indicator) {
indicator.setIndeterminate(true);
for (VirtualFile root : myRoots) {
try {
File path = virtualToIoFile(root);
File pathOrParent = virtualToIoFile(root.isDirectory() ? root : root.getParent());
indicator.setText(message("action.Subversion.cleanup.progress.text", path));
myVcs.getFactory(path).createCleanupClient().cleanup(pathOrParent, new SvnProgressCanceller(indicator));
} catch (VcsException e) {
myExceptions.add(Pair.create(e, root));
}
}
}
use of org.jetbrains.idea.svn.SvnProgressCanceller in project intellij-community by JetBrains.
the class CreateExternalAction method doInBackground.
private static void doInBackground(@NotNull Project project, @NotNull VirtualFile file, String url, boolean checkout, String target) {
SvnVcs vcs = SvnVcs.getInstance(project);
VcsDirtyScopeManager dirtyScopeManager = VcsDirtyScopeManager.getInstance(project);
File ioFile = virtualToIoFile(file);
try {
addToExternalProperty(vcs, ioFile, target, url);
dirtyScopeManager.fileDirty(file);
if (checkout) {
UpdateClient client = vcs.getFactory(ioFile).createUpdateClient();
client.setEventHandler(new SvnProgressCanceller());
client.doUpdate(ioFile, SVNRevision.HEAD, Depth.UNKNOWN, false, false);
file.refresh(true, true, () -> dirtyScopeManager.dirDirtyRecursively(file));
}
} catch (VcsException e) {
AbstractVcsHelper.getInstance(project).showError(e, "Create External");
}
}
Aggregations