From ff764c7aadab5e3d76208ba8a90d2c575d94ab6e Mon Sep 17 00:00:00 2001 From: Louis Vignier Date: Fri, 27 Oct 2023 20:04:31 +0200 Subject: [PATCH] [codeInspection.ui] Delete RegExpAdvertiser#getActions IJ-CR-117041 GitOrigin-RevId: e4657b48961f96489fcfa6458a70979e029e7563 --- .../regexp/inspection/custom/RegExpAdvertiser.java | 10 ---------- .../codeInspection/ui/InspectionTreeAdvertiser.java | 9 --------- .../inspection/StructuralSearchAdvertiser.java | 13 ------------- 3 files changed, 32 deletions(-) diff --git a/RegExpSupport/src/org/intellij/lang/regexp/inspection/custom/RegExpAdvertiser.java b/RegExpSupport/src/org/intellij/lang/regexp/inspection/custom/RegExpAdvertiser.java index b5de0a0cf26d..3875ed56d33a 100644 --- a/RegExpSupport/src/org/intellij/lang/regexp/inspection/custom/RegExpAdvertiser.java +++ b/RegExpSupport/src/org/intellij/lang/regexp/inspection/custom/RegExpAdvertiser.java @@ -1,22 +1,12 @@ package org.intellij.lang.regexp.inspection.custom; -import com.intellij.openapi.actionSystem.AnAction; import com.intellij.profile.codeInspection.ui.InspectionTreeAdvertiser; -import com.intellij.profile.codeInspection.ui.SingleInspectionProfilePanel; import org.intellij.lang.regexp.RegExpBundle; -import org.jetbrains.annotations.NotNull; import java.util.List; public class RegExpAdvertiser extends InspectionTreeAdvertiser { - @Override - public @NotNull List getActions(SingleInspectionProfilePanel panel) { - return List.of( - new RegExpProfileActionProvider.AddCustomRegExpInspectionAction(panel, RegExpBundle.message("inspection.tree.create.inspection"), false) - ); - } - @Override public List getCustomGroups() { return List.of( diff --git a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/InspectionTreeAdvertiser.java b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/InspectionTreeAdvertiser.java index 4641018f67d2..7ccb444cb9e0 100644 --- a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/InspectionTreeAdvertiser.java +++ b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/InspectionTreeAdvertiser.java @@ -1,9 +1,7 @@ // 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.profile.codeInspection.ui; -import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.extensions.ExtensionPointName; -import org.jetbrains.annotations.NotNull; import java.util.List; @@ -14,13 +12,6 @@ public abstract class InspectionTreeAdvertiser { public static final ExtensionPointName EP_NAME = ExtensionPointName.create("com.intellij.inspectionTreeAdvertiser"); - /** - * Returns additional actions for creating inspections. - * They appear when no inspections are found after filtering the inspection tree. - */ - @NotNull - public List getActions(SingleInspectionProfilePanel panel) { return List.of(); } - public record CustomGroup(String[] path, String description) {} /** diff --git a/platform/structuralsearch/source/com/intellij/structuralsearch/inspection/StructuralSearchAdvertiser.java b/platform/structuralsearch/source/com/intellij/structuralsearch/inspection/StructuralSearchAdvertiser.java index 60d5fd24e0fd..3f5628b74187 100644 --- a/platform/structuralsearch/source/com/intellij/structuralsearch/inspection/StructuralSearchAdvertiser.java +++ b/platform/structuralsearch/source/com/intellij/structuralsearch/inspection/StructuralSearchAdvertiser.java @@ -1,26 +1,13 @@ // 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.structuralsearch.inspection; -import com.intellij.openapi.actionSystem.AnAction; import com.intellij.profile.codeInspection.ui.InspectionTreeAdvertiser; -import com.intellij.profile.codeInspection.ui.SingleInspectionProfilePanel; import com.intellij.structuralsearch.SSRBundle; -import com.intellij.structuralsearch.inspection.StructuralSearchProfileActionProvider.AddInspectionAction; -import org.jetbrains.annotations.NotNull; import java.util.List; public class StructuralSearchAdvertiser extends InspectionTreeAdvertiser { - @Override - @NotNull - public List getActions(SingleInspectionProfilePanel panel) { - return List.of( - new AddInspectionAction(panel, SSRBundle.message("inspection.tree.create.inspection.search.template"), false), - new AddInspectionAction(panel, SSRBundle.message("inspection.tree.create.inspection.replace.template"), true) - ); - } - @Override public List getCustomGroups() { return List.of(