IDEA-95097

This commit is contained in:
Maxim Shafirov
2012-11-16 17:12:10 +04:00
parent 54f1a6f155
commit f2e536f85e
@@ -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;
}