mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
backgroundable process without project lead to lost key events (IDEA-95754)
== the status bar is chosen randomly; for welcome screen simple NPE workaround (cherry picked from commit e17cc7f763866bb566619fc98d47909d9ef4aebe)
This commit is contained in:
+4
-2
@@ -66,7 +66,7 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
}
|
||||
|
||||
public BackgroundableProcessIndicator(@Nullable final Project project, @NotNull TaskInfo info, @NotNull PerformInBackgroundOption option) {
|
||||
super(info.isCancellable(), project != null && !project.isDefault(), project, info.getCancelText());
|
||||
super(info.isCancellable(), true, project, info.getCancelText());
|
||||
if (project != null) {
|
||||
final ProjectManagerAdapter myListener = new ProjectManagerAdapter() {
|
||||
public void projectClosing(Project closingProject) {
|
||||
@@ -153,7 +153,9 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
}
|
||||
|
||||
private void doBackground() {
|
||||
myStatusBar.addProgress(this, myInfo);
|
||||
if (myStatusBar != null) { //not welcome screen
|
||||
myStatusBar.addProgress(this, myInfo);
|
||||
}
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
|
||||
@@ -109,7 +109,7 @@ public final class ExecutionHandler {
|
||||
|
||||
final boolean startInBackground = buildFile.isRunInBackground();
|
||||
|
||||
new Task.Backgroundable(null, AntBundle.message("ant.build.progress.dialog.title"), true) {
|
||||
new Task.Backgroundable(buildFile.getProject(), AntBundle.message("ant.build.progress.dialog.title"), true) {
|
||||
|
||||
public boolean shouldStartInBackground() {
|
||||
return startInBackground;
|
||||
|
||||
Reference in New Issue
Block a user