diff --git a/java/java-impl/src/com/intellij/cyclicDependencies/actions/CyclicDependenciesAction.java b/java/java-impl/src/com/intellij/cyclicDependencies/actions/CyclicDependenciesAction.java index 58ff9a6a9f18..bb7db6267e91 100644 --- a/java/java-impl/src/com/intellij/cyclicDependencies/actions/CyclicDependenciesAction.java +++ b/java/java-impl/src/com/intellij/cyclicDependencies/actions/CyclicDependenciesAction.java @@ -1,4 +1,18 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +/* + * Copyright 2000-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.intellij.cyclicDependencies.actions; import com.intellij.analysis.AnalysisScope; @@ -41,11 +55,6 @@ public class CyclicDependenciesAction extends AnAction{ event.getData(CommonDataKeys.PROJECT) != null); } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void actionPerformed(@NotNull AnActionEvent e) { DataContext dataContext = e.getDataContext(); diff --git a/platform/execution-impl/src/com/intellij/execution/actions/RunConfigurationsComboBoxAction.java b/platform/execution-impl/src/com/intellij/execution/actions/RunConfigurationsComboBoxAction.java index 2ad03e348574..eeac0fbdd9fa 100644 --- a/platform/execution-impl/src/com/intellij/execution/actions/RunConfigurationsComboBoxAction.java +++ b/platform/execution-impl/src/com/intellij/execution/actions/RunConfigurationsComboBoxAction.java @@ -65,11 +65,6 @@ public class RunConfigurationsComboBoxAction extends ComboBoxAction implements D return Registry.is("run.current.file.item.in.run.configurations.combobox"); } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void update(@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); diff --git a/platform/lang-impl/src/com/intellij/analysis/problemsView/toolWindow/ProblemFilter.kt b/platform/lang-impl/src/com/intellij/analysis/problemsView/toolWindow/ProblemFilter.kt index 261e4cca8832..9287c05c6a10 100644 --- a/platform/lang-impl/src/com/intellij/analysis/problemsView/toolWindow/ProblemFilter.kt +++ b/platform/lang-impl/src/com/intellij/analysis/problemsView/toolWindow/ProblemFilter.kt @@ -5,7 +5,6 @@ import com.intellij.analysis.problemsView.Problem import com.intellij.codeInsight.daemon.impl.SeverityRegistrar import com.intellij.lang.annotation.HighlightSeverity import com.intellij.openapi.actionSystem.ActionGroup -import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.project.DumbAware @@ -35,10 +34,6 @@ internal class SeverityFiltersActionGroup : DumbAware, ActionGroup() { actions.add(OtherSeveritiesFilterAction(otherSeverities.map { it.myVal }, panel)) return actions.toTypedArray() } - - override fun getActionUpdateThread(): ActionUpdateThread { - return ActionUpdateThread.EDT - } } private abstract class SeverityFilterActionBase(name: @Nls String, protected val panel: HighlightingPanel): DumbAwareToggleAction(name) { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/actions/OptimizeImportsAction.java b/platform/lang-impl/src/com/intellij/codeInsight/actions/OptimizeImportsAction.java index ced4221b646b..8e01f8e7043a 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/actions/OptimizeImportsAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/actions/OptimizeImportsAction.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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. package com.intellij.codeInsight.actions; @@ -146,11 +146,6 @@ public class OptimizeImportsAction extends AnAction { } } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void update(@NotNull AnActionEvent event) { if (!LanguageImportStatements.INSTANCE.hasAnyExtensions()) { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/actions/ReformatCodeAction.java b/platform/lang-impl/src/com/intellij/codeInsight/actions/ReformatCodeAction.java index c5cda711f3ca..99c41c190595 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/actions/ReformatCodeAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/actions/ReformatCodeAction.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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. package com.intellij.codeInsight.actions; @@ -250,10 +250,7 @@ public class ReformatCodeAction extends AnAction implements DumbAware, LightEdit return PsiUtilCore.toPsiFileArray(list); } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } + @Override public void update(@NotNull AnActionEvent event){ diff --git a/platform/lang-impl/src/com/intellij/codeInsight/actions/ShowReformatFileDialog.java b/platform/lang-impl/src/com/intellij/codeInsight/actions/ShowReformatFileDialog.java index f5f697900c63..c39f685f8640 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/actions/ShowReformatFileDialog.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/actions/ShowReformatFileDialog.java @@ -1,4 +1,18 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +/* + * Copyright 2000-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.intellij.codeInsight.actions; import com.intellij.lang.LanguageFormatting; @@ -14,11 +28,6 @@ import org.jetbrains.annotations.NotNull; public class ShowReformatFileDialog extends AnAction implements DumbAware { private static final @NonNls String HELP_ID = "editing.codeReformatting"; - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void update(@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); @@ -43,15 +52,18 @@ public class ShowReformatFileDialog extends AnAction implements DumbAware { @Override public void actionPerformed(@NotNull AnActionEvent event) { + Presentation presentation = event.getPresentation(); DataContext dataContext = event.getDataContext(); Project project = CommonDataKeys.PROJECT.getData(dataContext); Editor editor = CommonDataKeys.EDITOR.getData(dataContext); if (project == null || editor == null) { + presentation.setEnabled(false); return; } PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument()); if (file == null || file.getVirtualFile() == null) { + presentation.setEnabled(false); return; } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/codeVision/ShowCodeVisionPopupAction.kt b/platform/lang-impl/src/com/intellij/codeInsight/codeVision/ShowCodeVisionPopupAction.kt index 3f44f736cccd..6d1f4f924168 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/codeVision/ShowCodeVisionPopupAction.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/codeVision/ShowCodeVisionPopupAction.kt @@ -1,16 +1,10 @@ -// 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.codeInsight.codeVision -import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.PlatformDataKeys class ShowCodeVisionPopupAction : AnAction(CodeVisionBundle.message("ShowCodeVisionPopupAction.action.show.code.vision.text")) { - override fun getActionUpdateThread(): ActionUpdateThread { - return ActionUpdateThread.BGT - } - override fun update(e: AnActionEvent) { e.presentation.isEnabled = e.getData(PlatformDataKeys.EDITOR) != null } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ConfigureHighlightingLevel.kt b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ConfigureHighlightingLevel.kt index 6273a9ad8abc..a04022700c35 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ConfigureHighlightingLevel.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ConfigureHighlightingLevel.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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. package com.intellij.codeInsight.daemon.impl import com.intellij.codeInsight.daemon.DaemonBundle.message @@ -78,9 +78,6 @@ private class LevelAction(val level: InspectionsLevel, val provider: FileViewPro internal class ConfigureHighlightingLevelAction : DumbAwareAction() { - override fun getActionUpdateThread(): ActionUpdateThread { - return ActionUpdateThread.BGT - } override fun update(event: AnActionEvent) { val enabled = event.getData(PSI_FILE)?.viewProvider?.languages?.isNotEmpty() diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/TogglePopupHintsAction.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/TogglePopupHintsAction.java index d825dfb759ad..14f1cf467454 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/TogglePopupHintsAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/TogglePopupHintsAction.java @@ -1,9 +1,26 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +/* + * Copyright 2000-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.intellij.codeInsight.daemon.impl; import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; -import com.intellij.openapi.actionSystem.*; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.CommonDataKeys; +import com.intellij.openapi.actionSystem.DataContext; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.fileEditor.FileEditorManager; import com.intellij.openapi.project.Project; @@ -15,11 +32,6 @@ import org.jetbrains.annotations.NotNull; public class TogglePopupHintsAction extends AnAction { private static final Logger LOG = Logger.getInstance(TogglePopupHintsAction.class); - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.EDT; - } - @Override public void update(@NotNull AnActionEvent e) { PsiFile psiFile = getTargetFile(e.getDataContext()); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/documentation/render/ToggleRenderAllDocs.java b/platform/lang-impl/src/com/intellij/codeInsight/documentation/render/ToggleRenderAllDocs.java index 520456d10d50..e060f715607e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/documentation/render/ToggleRenderAllDocs.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/documentation/render/ToggleRenderAllDocs.java @@ -1,7 +1,6 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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. package com.intellij.codeInsight.documentation.render; -import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.ToggleAction; import com.intellij.openapi.editor.ex.EditorSettingsExternalizable; @@ -9,11 +8,6 @@ import com.intellij.openapi.project.DumbAware; import org.jetbrains.annotations.NotNull; public class ToggleRenderAllDocs extends ToggleAction implements DumbAware { - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public boolean isSelected(@NotNull AnActionEvent e) { return EditorSettingsExternalizable.getInstance().isDocCommentRenderingEnabled(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/highlighting/actions/HighlightUsagesAction.java b/platform/lang-impl/src/com/intellij/codeInsight/highlighting/actions/HighlightUsagesAction.java index 02e6c96705f3..f2c10b597615 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/highlighting/actions/HighlightUsagesAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/highlighting/actions/HighlightUsagesAction.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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. package com.intellij.codeInsight.highlighting.actions; import com.intellij.codeInsight.highlighting.HighlightUsagesHandler; @@ -19,11 +19,6 @@ public class HighlightUsagesAction extends AnAction implements DumbAware { setInjectedContext(true); } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void update(@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/QuickPreviewAction.java b/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/QuickPreviewAction.java index 8a6744f8dcca..59f6910165e9 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/QuickPreviewAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/QuickPreviewAction.java @@ -1,9 +1,12 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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. package com.intellij.codeInsight.hint.actions; import com.intellij.codeInsight.hint.ImplementationViewSession; import com.intellij.codeInsight.hint.ImplementationViewSessionFactory; -import com.intellij.openapi.actionSystem.*; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.CommonDataKeys; +import com.intellij.openapi.actionSystem.DataContext; +import com.intellij.openapi.actionSystem.PlatformCoreDataKeys; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiElement; @@ -36,11 +39,6 @@ public class QuickPreviewAction extends ShowImplementationsAction { } } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.OLD_EDT; - } - protected boolean isQuickPreviewAvailableFor(AnActionEvent e) { Component component = e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT); if (component instanceof JTree || component instanceof JList) { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java b/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java index 5aedf7b5e9a3..877c81cadf5e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java @@ -1,10 +1,9 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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. package com.intellij.codeInsight.hint.actions; import com.intellij.codeInsight.CodeInsightBundle; import com.intellij.codeInsight.hint.ImplementationViewSession; import com.intellij.codeInsight.hint.ImplementationViewSessionFactory; -import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.project.Project; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -15,11 +14,6 @@ public class ShowImplementationsAction extends ShowRelatedElementsActionBase { @NonNls public static final String CODEASSISTS_QUICKDEFINITION_LOOKUP_FEATURE = "codeassists.quickdefinition.lookup"; @NonNls public static final String CODEASSISTS_QUICKDEFINITION_FEATURE = "codeassists.quickdefinition"; - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override @NotNull protected List getSessionFactories() { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowTypeDefinitionAction.kt b/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowTypeDefinitionAction.kt index d84a2e7f7bc3..9933c879659a 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowTypeDefinitionAction.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowTypeDefinitionAction.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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. package com.intellij.codeInsight.hint.actions import com.intellij.codeInsight.CodeInsightBundle @@ -6,7 +6,6 @@ import com.intellij.codeInsight.documentation.DocumentationManager import com.intellij.codeInsight.hint.* import com.intellij.codeInsight.navigation.actions.TypeDeclarationProvider import com.intellij.ide.DataManager -import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.CommonDataKeys import com.intellij.openapi.actionSystem.DataContext import com.intellij.openapi.application.ReadAction @@ -26,10 +25,6 @@ import java.awt.Component import kotlin.streams.asSequence open class ShowTypeDefinitionAction : ShowRelatedElementsActionBase() { - override fun getActionUpdateThread(): ActionUpdateThread { - return ActionUpdateThread.BGT - } - override fun getSessionFactories(): List = listOf(TypeDefinitionsViewSessionFactory) override fun getPopupTitle(session: ImplementationViewSession): String { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hints/ToggleCompletionHintsAction.java b/platform/lang-impl/src/com/intellij/codeInsight/hints/ToggleCompletionHintsAction.java index fc823155074a..35f7b84b56de 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hints/ToggleCompletionHintsAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/hints/ToggleCompletionHintsAction.java @@ -1,8 +1,21 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +/* + * Copyright 2000-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.intellij.codeInsight.hints; import com.intellij.codeInsight.CodeInsightSettings; -import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.ToggleAction; @@ -10,11 +23,6 @@ import com.intellij.psi.PsiFile; import org.jetbrains.annotations.NotNull; public class ToggleCompletionHintsAction extends ToggleAction { - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void update(@NotNull AnActionEvent e) { super.update(e); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hints/ToggleInlayHintsGloballyAction.kt b/platform/lang-impl/src/com/intellij/codeInsight/hints/ToggleInlayHintsGloballyAction.kt index 9ec7a1433030..1bad7917585c 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hints/ToggleInlayHintsGloballyAction.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/hints/ToggleInlayHintsGloballyAction.kt @@ -1,8 +1,7 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.codeInsight.hints import com.intellij.codeInsight.CodeInsightBundle -import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.ToggleAction import com.intellij.openapi.actionSystem.Toggleable @@ -12,10 +11,6 @@ class ToggleInlayHintsGloballyAction : ToggleAction(CodeInsightBundle.message("i return InlayHintsSettings.instance().hintsEnabledGlobally() } - override fun getActionUpdateThread(): ActionUpdateThread { - return ActionUpdateThread.BGT - } - override fun setSelected(e: AnActionEvent, state: Boolean) { InlayHintsSettings.instance().setEnabledGlobally(state) InlayHintsPassFactory.forceHintsUpdateOnNextPass() diff --git a/platform/lang-impl/src/com/intellij/codeInsight/navigation/actions/IncrementalSearchAction.java b/platform/lang-impl/src/com/intellij/codeInsight/navigation/actions/IncrementalSearchAction.java index 91f1d7a354a2..cb53884e968b 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/navigation/actions/IncrementalSearchAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/navigation/actions/IncrementalSearchAction.java @@ -1,12 +1,26 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +/* + * Copyright 2000-2009 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.intellij.codeInsight.navigation.actions; import com.intellij.codeInsight.navigation.IncrementalSearchHandler; import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.editor.Editor; -import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; +import com.intellij.openapi.project.DumbAware; import org.jetbrains.annotations.NotNull; public class IncrementalSearchAction extends AnAction implements DumbAware { @@ -24,11 +38,6 @@ public class IncrementalSearchAction extends AnAction implements DumbAware { new IncrementalSearchHandler().invoke(project, editor); } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void update(@NotNull AnActionEvent event){ Presentation presentation = event.getPresentation(); diff --git a/platform/lang-impl/src/com/intellij/codeInspection/actions/CodeInspectionOnEditorAction.java b/platform/lang-impl/src/com/intellij/codeInspection/actions/CodeInspectionOnEditorAction.java index 280a84519d24..622d7d16280f 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/actions/CodeInspectionOnEditorAction.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/actions/CodeInspectionOnEditorAction.java @@ -1,4 +1,18 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +/* + * Copyright 2000-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.intellij.codeInspection.actions; import com.intellij.analysis.AnalysisScope; @@ -6,7 +20,10 @@ import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; import com.intellij.codeInspection.InspectionManager; import com.intellij.codeInspection.ex.GlobalInspectionContextImpl; import com.intellij.codeInspection.ex.InspectionManagerEx; -import com.intellij.openapi.actionSystem.*; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.CommonDataKeys; +import com.intellij.openapi.actionSystem.DataContext; import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.project.Project; import com.intellij.profile.codeInspection.InspectionProjectProfileManager; @@ -37,11 +54,6 @@ public class CodeInspectionOnEditorAction extends AnAction { inspectionContext.doInspections(scope); } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void update(@NotNull AnActionEvent e) { final DataContext dataContext = e.getDataContext(); diff --git a/platform/lang-impl/src/com/intellij/codeInspection/actions/ViewOfflineResultsAction.java b/platform/lang-impl/src/com/intellij/codeInspection/actions/ViewOfflineResultsAction.java index 18a00a62c344..12841c0ddbb7 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/actions/ViewOfflineResultsAction.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/actions/ViewOfflineResultsAction.java @@ -15,7 +15,10 @@ import com.intellij.codeInspection.offlineViewer.OfflineViewParseUtil; import com.intellij.codeInspection.reference.RefManagerImpl; import com.intellij.codeInspection.ui.InspectionResultsView; import com.intellij.icons.AllIcons; -import com.intellij.openapi.actionSystem.*; +import com.intellij.openapi.actionSystem.ActionPlaces; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ReadAction; import com.intellij.openapi.diagnostic.Logger; @@ -54,11 +57,6 @@ public class ViewOfflineResultsAction extends AnAction { presentation.setVisible(ActionPlaces.isMainMenuOrActionSearch(event.getPlace())); } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void actionPerformed(@NotNull AnActionEvent event) { final Project project = event.getProject(); diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ex/SeverityEditorDialogAction.java b/platform/lang-impl/src/com/intellij/codeInspection/ex/SeverityEditorDialogAction.java index e79e3537b3ac..213f809a9f14 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/SeverityEditorDialogAction.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/SeverityEditorDialogAction.java @@ -1,9 +1,8 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2018 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.codeInspection.ex; import com.intellij.codeInsight.daemon.impl.SeverityRegistrar; import com.intellij.idea.ActionsBundle; -import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.project.DumbAware; @@ -18,11 +17,6 @@ public class SeverityEditorDialogAction extends AnAction implements DumbAware { super(ActionsBundle.messagePointer("action.SeverityEditorDialogAction.text")); } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void actionPerformed(@NotNull AnActionEvent e) { Project project = e.getProject(); diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/QuickFixesViewActionGroup.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/QuickFixesViewActionGroup.java index 22bcf2e60338..022f2730b847 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/QuickFixesViewActionGroup.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/QuickFixesViewActionGroup.java @@ -1,11 +1,12 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +/* + * Copyright 2000-2017 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.codeInspection.ui.actions; import com.intellij.codeInspection.ex.InspectionToolWrapper; import com.intellij.codeInspection.ex.QuickFixAction; import com.intellij.codeInspection.ui.InspectionResultsView; import com.intellij.openapi.actionSystem.ActionGroup; -import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import org.jetbrains.annotations.NotNull; @@ -17,11 +18,6 @@ import static com.intellij.codeInspection.ui.actions.InspectionViewActionBase.ge * @author Dmitry Batkovich */ public class QuickFixesViewActionGroup extends ActionGroup { - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.EDT; - } - @Override public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) { InspectionResultsView view = getView(e); diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/suppress/SuppressActionWrapper.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/suppress/SuppressActionWrapper.java index 901fee813cde..63a725dfdd37 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/suppress/SuppressActionWrapper.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/actions/suppress/SuppressActionWrapper.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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. package com.intellij.codeInspection.ui.actions.suppress; @@ -39,11 +39,6 @@ public class SuppressActionWrapper extends ActionGroup implements CompactActionG super(InspectionsBundle.messagePointer("suppress.inspection.problem"), false); } - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.EDT; - } - @Override public AnAction @NotNull [] getChildren(@Nullable final AnActionEvent e) { final InspectionResultsView view = getView(e); diff --git a/platform/lang-impl/src/com/intellij/ide/actions/GotoActionBase.java b/platform/lang-impl/src/com/intellij/ide/actions/GotoActionBase.java index fb074ace1ed9..b8be33e4c907 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/GotoActionBase.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/GotoActionBase.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// 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.ide.actions; @@ -67,11 +67,6 @@ public abstract class GotoActionBase extends AnAction { protected abstract void gotoActionPerformed(@NotNull AnActionEvent e); - @Override - public @NotNull ActionUpdateThread getActionUpdateThread() { - return ActionUpdateThread.BGT; - } - @Override public void update(@NotNull final AnActionEvent event) { final Presentation presentation = event.getPresentation();