mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-95097
This commit is contained in:
+8
-4
@@ -90,13 +90,17 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
setTitle(info.getTitle());
|
||||
final Project nonDefaultProject = project == null || project.isDisposed() ? null : project.isDefault() ? null : project;
|
||||
final IdeFrame frame = ((WindowManagerEx)WindowManager.getInstance()).findFrameFor(nonDefaultProject);
|
||||
myStatusBar = (StatusBarEx)frame.getStatusBar();
|
||||
myBackgrounded = option.shouldStartInBackground();
|
||||
if (option.shouldStartInBackground()) {
|
||||
myStatusBar = frame != null ? (StatusBarEx)frame.getStatusBar() : null;
|
||||
myBackgrounded = shouldStartInBackground();
|
||||
if (myBackgrounded) {
|
||||
doBackground();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean shouldStartInBackground() {
|
||||
return myOption.shouldStartInBackground() && myStatusBar != null;
|
||||
}
|
||||
|
||||
public BackgroundableProcessIndicator(Project project,
|
||||
@Nls final String progressTitle,
|
||||
@NotNull PerformInBackgroundOption option,
|
||||
@@ -133,7 +137,7 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
protected void showDialog() {
|
||||
if (myDisposed) return;
|
||||
|
||||
if (myOption.shouldStartInBackground()) {
|
||||
if (shouldStartInBackground()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user