mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove unnecessary overrides of Task$Backgroundable#shouldStartInBackground
GitOrigin-RevId: c730cc278a7dd3856fb7181ffb0442a6274d4aa6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d7cf8e220d
commit
05af40a707
+6
-8
@@ -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.platform.templates;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
@@ -22,7 +22,10 @@ import com.intellij.openapi.components.PathMacroManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.progress.*;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.progress.Task;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.ContentIterator;
|
||||
@@ -86,7 +89,7 @@ public class SaveProjectAsTemplateAction extends AnAction implements DumbAware {
|
||||
|
||||
FileDocumentManager.getInstance().saveAllDocuments();
|
||||
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(project, LangBundle.message("progress.title.saving.project.as.template"), true, PerformInBackgroundOption.DEAF) {
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(project, LangBundle.message("progress.title.saving.project.as.template"), true) {
|
||||
@Override
|
||||
public void run(@NotNull final ProgressIndicator indicator) {
|
||||
saveProject(project, file, moduleToSave, description, dialog.isReplaceParameters(), indicator, shouldEscape());
|
||||
@@ -109,11 +112,6 @@ public class SaveProjectAsTemplateAction extends AnAction implements DumbAware {
|
||||
notification.notify(getProject());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldStartInBackground() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
PathKt.delete(file);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 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.util.download.impl;
|
||||
|
||||
import com.intellij.ide.IdeBundle;
|
||||
@@ -155,10 +155,6 @@ class FileDownloaderImpl implements FileDownloader {
|
||||
CompletableFuture<List<Pair<VirtualFile, DownloadableFileDescription>>> result = new CompletableFuture<>();
|
||||
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(project, myDialogTitle, true) {
|
||||
@Override
|
||||
public boolean shouldStartInBackground() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
|
||||
+2
-6
@@ -2,6 +2,7 @@
|
||||
package com.intellij.xdebugger.impl.ui.tree.nodes;
|
||||
|
||||
import com.intellij.notification.NotificationType;
|
||||
import com.intellij.openapi.progress.PerformInBackgroundOption;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.Task;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -83,7 +84,7 @@ public class HeadlessValueEvaluationCallback implements XFullValueEvaluator.XFul
|
||||
return;
|
||||
}
|
||||
|
||||
new Task.Backgroundable(myNode.getTree().getProject(), XDebuggerBundle.message("load.value.task.text")) {
|
||||
new Task.Backgroundable(myNode.getTree().getProject(), XDebuggerBundle.message("load.value.task.text"), true, PerformInBackgroundOption.DEAF) {
|
||||
@Override
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
indicator.setIndeterminate(true);
|
||||
@@ -95,11 +96,6 @@ public class HeadlessValueEvaluationCallback implements XFullValueEvaluator.XFul
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldStartInBackground() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
myCanceled = true;
|
||||
|
||||
@@ -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.lang.ant.config.execution;
|
||||
|
||||
import com.intellij.execution.CantRunException;
|
||||
@@ -147,11 +147,6 @@ public final class ExecutionHandler {
|
||||
final FutureResult<ProcessHandler> future = new FutureResult<>();
|
||||
new Task.Backgroundable(buildFile.getProject(), AntBundle.message("ant.build.progress.dialog.title"), true) {
|
||||
|
||||
@Override
|
||||
public boolean shouldStartInBackground() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
listenerWrapper.buildFinished(AntBuildListener.ABORTED, 0);
|
||||
|
||||
Reference in New Issue
Block a user