public static HyperlinkAdapter createSettingsHyperlinkListener(Project project, SingleInspectionProfilePanel panel) {
    return new HyperlinkAdapter() {
      @Override
      protected void hyperlinkActivated(@NotNull HyperlinkEvent e) {
        try {
          URI url = new URI(e.getDescription());
          if (url.getScheme().equals("settings")) {
            DataContext context = DataManager.getInstance().getDataContextFromFocus().getResult();
            if (context != null) {
              Settings settings = Settings.KEY.getData(context);
              SearchTextField searchTextField = SearchTextField.KEY.getData(context);
              String configId = url.getAuthority(); //using `getAuthority` instead of `getHost` to support white spaces in configId
              String search = url.getQuery();
              if (settings != null) {
                Configurable configurable = settings.find(configId);
                settings.select(configurable).doWhenDone(() -> {
                  if (searchTextField != null && search != null) searchTextField.setText(search);
                });
              } else {
                ShowSettingsUtilImpl.showSettingsDialog(project, configId, search);
              }
            }
          }
          else if (url.getScheme().equals("action") && panel != null) {
            final var action = InspectionProfileActionProvider.EP_NAME.getExtensionList().stream()
              .flatMap(provider -> provider.getProfilePanelActions(panel).stream())
              .filter(a -> a.actionId().equals(url.getAuthority()))
              .findFirst();
            if (action.isPresent()) {
              final AnAction urlAction = action.get().action();
              if (urlAction instanceof ActionGroup group) {
                final ActionPopupMenu menu = ActionManager.getInstance().createActionPopupMenu(ActionPlaces.POPUP, group);
                final Point point = new Point();
                if (e.getInputEvent() instanceof MouseEvent mouseEvent) {
                  point.x = mouseEvent.getX();
                  point.y = mouseEvent.getY();
                }
                menu.getComponent().show((Component)e.getSource(), point.x, point.y);
              } else {
                final AnActionEvent event = AnActionEvent.createFromInputEvent(
                  e.getInputEvent(), ActionPlaces.UNKNOWN, null, DataContext.EMPTY_CONTEXT
                );
                action.get().action().actionPerformed(event);
              }
            }
          }
          else {
            BrowserUtil.browse(url);
          }
        }
        catch (URISyntaxException ex) {
          LOG.error(ex);
        }
      }
    };
  }
public static HyperlinkAdapter createSettingsHyperlinkListener(Project project, SingleInspectionProfilePanel panel)