mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-234632 inline ide.background.tasks
GitOrigin-RevId: fb3e890267ec1ba240c089f4b9dc9f149deaba5c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e44d056b48
commit
d7ac4e133f
+4
-10
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.openapi.progress.impl;
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.intellij.openapi.progress.TaskInfo;
|
||||
import com.intellij.openapi.progress.util.ProgressWindow;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.NlsContexts;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.wm.IdeFrame;
|
||||
import com.intellij.openapi.wm.ex.StatusBarEx;
|
||||
import com.intellij.openapi.wm.ex.WindowManagerEx;
|
||||
@@ -45,7 +44,7 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
myOption = option;
|
||||
myInfo = info;
|
||||
myStatusBar = statusBarOverride;
|
||||
myBackgrounded = shouldStartInBackground();
|
||||
myBackgrounded = true;
|
||||
UIUtil.invokeLaterIfNeeded(() -> initializeStatusBar());
|
||||
}
|
||||
|
||||
@@ -68,12 +67,7 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
IdeFrame frame = WindowManagerEx.getInstanceEx().findFrameHelper(nonDefaultProject);
|
||||
myStatusBar = frame != null ? (StatusBarEx)frame.getStatusBar() : null;
|
||||
}
|
||||
myBackgrounded &= myStatusBar != null;
|
||||
if (myBackgrounded) doBackground(myStatusBar);
|
||||
}
|
||||
|
||||
private boolean shouldStartInBackground() {
|
||||
return Registry.is("ide.background.tasks") || myOption.shouldStartInBackground();
|
||||
doBackground(myStatusBar);
|
||||
}
|
||||
|
||||
public BackgroundableProcessIndicator(@Nullable Project project,
|
||||
@@ -112,7 +106,7 @@ public class BackgroundableProcessIndicator extends ProgressWindow {
|
||||
if (myDisposed) return;
|
||||
initializeOnEdtIfNeeded(); // could happen before initialization succeeds - in that case we do it now
|
||||
|
||||
if (shouldStartInBackground() && myStatusBar != null) {
|
||||
if (myStatusBar != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1970,8 +1970,6 @@ appcds.install.idleLongRetryDelay.description=Long wait time for AppCDS startup
|
||||
|
||||
indexing.progress.indicator.power=2.0
|
||||
indexing.progress.indicator.power.description=Indexing progress indicator speed-up ratio
|
||||
ide.background.tasks=true
|
||||
ide.background.tasks.description=Start backgroundable tasks in background without showing modal dialog with progress bar
|
||||
|
||||
ide.icon.tooltips=true
|
||||
ide.icon.tooltips.description=Show tooltips on icons explaining their meaning
|
||||
|
||||
Reference in New Issue
Block a user