[action-update-thread] misc actions: duplicates, thumbnails, etc

GitOrigin-RevId: 8e5b4a1247d3827390306b38b9a85c1aff4315de
This commit is contained in:
Anna Kozlova
2022-07-12 20:25:30 +02:00
committed by intellij-monorepo-bot
parent fec94113b4
commit b56651ab44
4 changed files with 28 additions and 8 deletions

View File

@@ -1,8 +1,9 @@
// 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-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.intellij.images.thumbnail.actions; package org.intellij.images.thumbnail.actions;
import com.intellij.ide.IdeBundle; import com.intellij.ide.IdeBundle;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.ToggleAction; import com.intellij.openapi.actionSystem.ToggleAction;
import org.intellij.images.options.OptionsManager; import org.intellij.images.options.OptionsManager;
@@ -32,4 +33,9 @@ public final class ToggleFileNameAction extends ToggleAction {
e.getPresentation().setEnabled(decorator != null && decorator.isEnabledForActionPlace(e.getPlace())); e.getPresentation().setEnabled(decorator != null && decorator.isEnabledForActionPlace(e.getPlace()));
e.getPresentation().setText(isSelected(e) ? IdeBundle.message("action.text.hide.file.name") : IdeBundle.message("action.text.show.file.name")); e.getPresentation().setText(isSelected(e) ? IdeBundle.message("action.text.hide.file.name") : IdeBundle.message("action.text.show.file.name"));
} }
@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}
} }

View File

@@ -1,8 +1,9 @@
// 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-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.intellij.images.thumbnail.actions; package org.intellij.images.thumbnail.actions;
import com.intellij.ide.IdeBundle; import com.intellij.ide.IdeBundle;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.ToggleAction; import com.intellij.openapi.actionSystem.ToggleAction;
import org.intellij.images.options.OptionsManager; import org.intellij.images.options.OptionsManager;
@@ -32,4 +33,9 @@ public final class ToggleFileSizeAction extends ToggleAction {
e.getPresentation().setEnabled(decorator != null && decorator.isEnabledForActionPlace(e.getPlace())); e.getPresentation().setEnabled(decorator != null && decorator.isEnabledForActionPlace(e.getPlace()));
e.getPresentation().setText(isSelected(e) ? IdeBundle.message("action.text.hide.file.size") : IdeBundle.message("action.text.show.file.size")); e.getPresentation().setText(isSelected(e) ? IdeBundle.message("action.text.hide.file.size") : IdeBundle.message("action.text.show.file.size"));
} }
@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}
} }

View File

@@ -1,12 +1,9 @@
// 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-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.plugins.javaFX.actions; package org.jetbrains.plugins.javaFX.actions;
import com.intellij.CommonBundle; import com.intellij.CommonBundle;
import com.intellij.execution.configurations.GeneralCommandLine; import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project; import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages; import com.intellij.openapi.ui.Messages;
@@ -69,4 +66,9 @@ public class OpenInSceneBuilderAction extends AnAction {
presentation.setEnabledAndVisible(true); presentation.setEnabledAndVisible(true);
} }
} }
@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
} }

View File

@@ -1,4 +1,4 @@
// 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. // Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.sh.run; package com.intellij.sh.run;
import com.intellij.execution.ExecutionManager; import com.intellij.execution.ExecutionManager;
@@ -8,6 +8,7 @@ import com.intellij.execution.actions.ConfigurationContext;
import com.intellij.execution.actions.RunConfigurationProducer; import com.intellij.execution.actions.RunConfigurationProducer;
import com.intellij.execution.executors.DefaultRunExecutor; import com.intellij.execution.executors.DefaultRunExecutor;
import com.intellij.execution.runners.ExecutionEnvironmentBuilder; import com.intellij.execution.runners.ExecutionEnvironmentBuilder;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.project.DumbAwareAction; import com.intellij.openapi.project.DumbAwareAction;
@@ -74,6 +75,11 @@ final class ShRunFileAction extends DumbAwareAction {
e.getPresentation().setEnabledAndVisible(isEnabled(e)); e.getPresentation().setEnabledAndVisible(isEnabled(e));
} }
@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}
private static @NotNull Pair<String, String> parseInterpreterAndOptions(@NotNull String shebang) { private static @NotNull Pair<String, String> parseInterpreterAndOptions(@NotNull String shebang) {
String[] splitShebang = shebang.split(" "); String[] splitShebang = shebang.split(" ");
if (splitShebang.length > 1) { if (splitShebang.length > 1) {