mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
action-update-thread: misc actions
GitOrigin-RevId: 9ea0f584e5b20dc4994bd7fce58b5db8243e7223
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3f690cc2a3
commit
cb70896afd
@@ -5,6 +5,7 @@ import com.intellij.analysis.JvmAnalysisBundle
|
||||
import com.intellij.notification.Notification
|
||||
import com.intellij.notification.NotificationType
|
||||
import com.intellij.notification.Notifications
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread
|
||||
import com.intellij.openapi.actionSystem.AnAction
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.actionSystem.LangDataKeys
|
||||
@@ -48,4 +49,8 @@ open class DumpUastTreeAction : AnAction() {
|
||||
UastLanguagePlugin.byLanguage(file.language) != null
|
||||
}
|
||||
}
|
||||
|
||||
override fun getActionUpdateThread(): ActionUpdateThread {
|
||||
return ActionUpdateThread.BGT
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
// 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.analysis.internal
|
||||
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiFile
|
||||
import org.jetbrains.uast.toUElement
|
||||
@@ -11,4 +12,8 @@ class DumpUastTreeActionByEach : DumpUastTreeAction() {
|
||||
override fun buildDump(file: PsiFile): String = object : IndentedPrintingVisitor({true}){
|
||||
override fun render(element: PsiElement): CharSequence? = element.toUElement()?.asLogString()
|
||||
}.also { file.accept(it) }.result
|
||||
|
||||
override fun getActionUpdateThread(): ActionUpdateThread {
|
||||
return ActionUpdateThread.BGT
|
||||
}
|
||||
}
|
||||
+6
@@ -5,6 +5,7 @@ import com.intellij.codeInsight.daemon.impl.HighlightInfo;
|
||||
import com.intellij.codeInsight.hint.HintManager;
|
||||
import com.intellij.injected.editor.EditorWindow;
|
||||
import com.intellij.lang.LangBundle;
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
@@ -63,6 +64,11 @@ public class JumpToColorsAndFontsAction extends DumbAwareAction {
|
||||
e.getPresentation().setEnabledAndVisible(project != null && editor != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
||||
return ActionUpdateThread.BGT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
// todo handle ColorKey's as well
|
||||
|
||||
+6
@@ -6,6 +6,7 @@ import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.ide.plugins.IdeaPluginDescriptor;
|
||||
import com.intellij.ide.plugins.PluginManagerCore;
|
||||
import com.intellij.lang.LanguageExtensionPoint;
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.editor.ex.EditorSettingsExternalizable;
|
||||
@@ -240,5 +241,10 @@ public class GutterIconsConfigurable implements SearchableConfigurable, Configur
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
ShowSettingsUtil.getInstance().showSettingsDialog(e.getProject(), GutterIconsConfigurable.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
||||
return ActionUpdateThread.BGT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,4 +45,9 @@ public class ExportToHTMLAction extends AnAction {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
||||
return ActionUpdateThread.BGT;
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.intellij.codeEditor.printing;
|
||||
|
||||
import com.intellij.ide.actions.PrintActionHandler;
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.project.DumbAwareAction;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -35,4 +36,9 @@ public class PrintAction extends DumbAwareAction {
|
||||
PrintActionHandler handler = PrintActionHandler.getHandler(e.getDataContext());
|
||||
e.getPresentation().setEnabled(handler != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
||||
return ActionUpdateThread.BGT;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
package com.intellij.application;
|
||||
|
||||
import com.intellij.ide.lightEdit.LightEditCompatible;
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.application.Experiments;
|
||||
import com.intellij.openapi.project.DumbAwareAction;
|
||||
@@ -21,4 +22,9 @@ final class ShowExperimentsAction extends DumbAwareAction implements LightEditCo
|
||||
boolean hasExperimentalFeatures = Experiments.EP_NAME.getExtensions().length > 0;
|
||||
e.getPresentation().setEnabledAndVisible(hasExperimentalFeatures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
||||
return ActionUpdateThread.BGT;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user