mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vsc] annotate: rethrow PCE to let ProgressManager handle it
This commit is contained in:
@@ -26,6 +26,7 @@ import com.intellij.openapi.fileEditor.FileEditor;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
import com.intellij.openapi.fileEditor.TextEditor;
|
||||
import com.intellij.openapi.localVcs.UpToDateLineNumberProvider;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.progress.Task;
|
||||
@@ -193,6 +194,9 @@ public class AnnotateToggleAction extends ToggleAction implements DumbAware, Ann
|
||||
catch (VcsException e) {
|
||||
exceptionRef.set(e);
|
||||
}
|
||||
catch (ProcessCanceledException pce) {
|
||||
throw pce;
|
||||
}
|
||||
catch (Throwable t) {
|
||||
exceptionRef.set(new VcsException(t));
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ package git4idea.annotate;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -87,6 +88,9 @@ public class GitAnnotationProvider implements AnnotationProviderEx, VcsCacheable
|
||||
final GitFileAnnotation result = annotate(realFilePath, revisionNumber, revisions, file);
|
||||
annotation[0] = result;
|
||||
}
|
||||
catch (ProcessCanceledException pce) {
|
||||
throw pce;
|
||||
}
|
||||
catch (Exception e) {
|
||||
exception[0] = e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user