[codeInspection.ui] Rename ActionToRegister to ProfilePanelAction

IJ-CR-123493

GitOrigin-RevId: 32081af4a5148b038ce72c7273f325b6f394d8e8
This commit is contained in:
Louis Vignier
2024-01-23 17:55:44 +01:00
committed by intellij-monorepo-bot
parent b7ca72a251
commit 9bb4157e09
4 changed files with 8 additions and 8 deletions

View File

@@ -26,8 +26,8 @@ public class RegExpProfileActionProvider extends InspectionProfileActionProvider
}
@Override
public List<ActionToRegister> getActionsToRegister(SingleInspectionProfilePanel panel) {
return List.of(new ActionToRegister(getActionGroup(panel), "regexp.profile.action.provider.add.group"));
public List<ProfilePanelAction> getProfilePanelActions(SingleInspectionProfilePanel panel) {
return List.of(new ProfilePanelAction(getActionGroup(panel), "regexp.profile.action.provider.add.group"));
}
@NotNull

View File

@@ -50,11 +50,11 @@ public abstract class InspectionProfileActionProvider {
*/
public void deleteInspection(InspectionProfileEntry entry, String shortName) {}
public record ActionToRegister(@NotNull AnAction action, @NotNull String actionId) {}
public record ProfilePanelAction(@NotNull AnAction action, @NotNull String actionId) {}
/**
* @return list of actions registered in the inspection profile configurable UI.<br>
* @return list of actions to be stored in the inspection profile configurable UI.<br>
* Such actions can be called from inspection descriptions with {@code <a href="action:id"></a>}.
*/
public List<ActionToRegister> getActionsToRegister(SingleInspectionProfilePanel panel) { return List.of(); }
public List<ProfilePanelAction> getProfilePanelActions(SingleInspectionProfilePanel panel) { return List.of(); }
}

View File

@@ -1150,7 +1150,7 @@ public class SingleInspectionProfilePanel extends JPanel {
}
else if (url.getScheme().equals("action") && panel != null) {
final var action = InspectionProfileActionProvider.EP_NAME.getExtensionList().stream()
.flatMap(provider -> provider.getActionsToRegister(panel).stream())
.flatMap(provider -> provider.getProfilePanelActions(panel).stream())
.filter(a -> a.actionId().equals(url.getAuthority()))
.findFirst();
if (action.isPresent()) {

View File

@@ -56,8 +56,8 @@ public class StructuralSearchProfileActionProvider extends InspectionProfileActi
}
@Override
public List<ActionToRegister> getActionsToRegister(SingleInspectionProfilePanel panel) {
return List.of(new ActionToRegister(getActionGroup(panel), "ssr.profile.action.provider.add.group"));
public List<ProfilePanelAction> getProfilePanelActions(SingleInspectionProfilePanel panel) {
return List.of(new ProfilePanelAction(getActionGroup(panel), "ssr.profile.action.provider.add.group"));
}
@NotNull