mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Code tolerates null ProgressIndicatorProvider
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ public class ClassInheritorsSearch extends ExtensibleQueryFactory<PsiClass, Clas
|
||||
|
||||
LOG.assertTrue(searchScope != null);
|
||||
|
||||
ProgressIndicator progress = ProgressIndicatorProvider.getInstance().getProgressIndicator();
|
||||
ProgressIndicator progress = ProgressIndicatorProvider.getGlobalProgressIndicator();
|
||||
if (progress != null) {
|
||||
progress.pushState();
|
||||
String className = ApplicationManager.getApplication().runReadAction(new Computable<String>() {
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class AllClassesSearchExecutor implements QueryExecutor<PsiClass, AllClas
|
||||
}
|
||||
});
|
||||
|
||||
final ProgressIndicator indicator = ProgressIndicatorProvider.getInstance().getProgressIndicator();
|
||||
final ProgressIndicator indicator = ProgressIndicatorProvider.getGlobalProgressIndicator();
|
||||
if (indicator != null) {
|
||||
indicator.checkCanceled();
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ public class ClsFileImpl extends ClsRepositoryPsiElement<PsiClassHolderFileStub>
|
||||
final ASTNode mirrorTreeElement = SourceTreeToPsiMap.psiElementToTree(mirror);
|
||||
|
||||
//IMPORTANT: do not take lock too early - FileDocumentManager.getInstance().saveToString() can run write action...
|
||||
final NonCancelableSection section = ProgressIndicatorProvider.getInstance().startNonCancelableSection();
|
||||
final NonCancelableSection section = ProgressIndicatorProvider.startNonCancelableSectionIfSupported();
|
||||
try {
|
||||
setMirror((TreeElement)mirrorTreeElement);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user