From d7ac4e133fec7e4c1e63f4c1d7dda65e25258b81 Mon Sep 17 00:00:00 2001 From: Daniil Ovchinnikov Date: Tue, 6 Apr 2021 12:57:01 +0200 Subject: [PATCH] IDEA-234632 inline `ide.background.tasks` GitOrigin-RevId: fb3e890267ec1ba240c089f4b9dc9f149deaba5c --- .../impl/BackgroundableProcessIndicator.java | 14 ++++---------- platform/util/resources/misc/registry.properties | 2 -- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/progress/impl/BackgroundableProcessIndicator.java b/platform/platform-impl/src/com/intellij/openapi/progress/impl/BackgroundableProcessIndicator.java index 3c49081e759a..07c9fa3e671b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/progress/impl/BackgroundableProcessIndicator.java +++ b/platform/platform-impl/src/com/intellij/openapi/progress/impl/BackgroundableProcessIndicator.java @@ -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; } diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index 4f353fc0673d..7e7d785cb35b 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -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