private static void registerKeyProviders(PsiReferenceRegistrar registrar) {
    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"key", "groupKey"},
                                                                  Holder.CONFIGURABLE_EP, Holder.INSPECTION_EP,
                                                                  Holder.NOTIFICATION_GROUP_EP),
                                        new PropertyKeyReferenceProvider(false, "groupKey", "groupBundle"));
    registrar.registerReferenceProvider(nestedExtensionAttributePattern(new String[]{"key", "groupKey"},
                                                                        Holder.CONFIGURABLE_EP),
                                        new PropertyKeyReferenceProvider(false, "groupKey", "groupBundle"));

    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"groupPathKey"}, Holder.INSPECTION_EP),
                                        new PropertyKeyReferenceProvider(false, "groupPathKey", "groupBundle"));

    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"nameKey"}, Holder.SCHEME_CONVERTER_EP),
                                        new PropertyKeyReferenceProvider(false, "nameKey", "nameBundle"));

    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"displayNameKey"},
                                                                  Holder.GROUP_CONFIGURABLE_EP),
                                        new PropertyKeyReferenceProvider(false, "displayNameKey", null) {
                                          @Override
                                          protected String getFallbackBundleName() {
                                            return OptionsBundle.BUNDLE;
                                          }
                                        });
    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"descriptionKey"},
                                                                  Holder.GROUP_CONFIGURABLE_EP),
                                        new PropertyKeyReferenceProvider(false, "descriptionKey", null) {
                                          @Override
                                          protected String getFallbackBundleName() {
                                            return OptionsBundle.BUNDLE;
                                          }
                                        });

    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"resourceKey"},
                                                                  Holder.TYPE_NAME_EP),
                                        new PropertyKeyReferenceProvider(false, "resourceKey", "resourceBundle"));

    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"displayName"},
                                                                  Holder.SPRING_TOOL_WINDOW_CONTENT),
                                        new PropertyKeyReferenceProvider(false, "displayName", "bundle"));

    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"nameKey"},
                                                                  Holder.DECLARATIVE_INLAY_PROVIDER_EP),
                                        new PropertyKeyReferenceProvider(false, "nameKey", null));
    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"descriptionKey"},
                                                                  Holder.DECLARATIVE_INLAY_PROVIDER_EP),
                                        new PropertyKeyReferenceProvider(false, "descriptionKey", null));
    registrar.registerReferenceProvider(nestedTagExtensionAttributePattern("option", new String[]{"nameKey"},
                                                                           Holder.DECLARATIVE_INLAY_PROVIDER_EP),
                                        new PropertyKeyReferenceProvider(false, "nameKey", null));
    registrar.registerReferenceProvider(nestedTagExtensionAttributePattern("option", new String[]{"descriptionKey"},
                                                                           Holder.DECLARATIVE_INLAY_PROVIDER_EP),
                                        new PropertyKeyReferenceProvider(false, "descriptionKey", null));


    XmlAttributeValuePattern idAttributeWithoutTitleKeyPattern =
      extensionAttributePattern(new String[]{"id"}, Holder.ADVANCED_SETTINGS_EP)
        .andNot(xmlAttributeValue().withSuperParent(2, xmlTag().withChild(xmlAttribute("titleKey"))));
    registrar.registerReferenceProvider(idAttributeWithoutTitleKeyPattern,
                                        new PropertyKeyReferenceProvider(false, "id", null) {
                                          @Override
                                          protected @NotNull String getFinalKeyValue(String keyValue) {
                                            return MessageBundleReferenceContributor.ADVANCED_SETTING + keyValue;
                                          }

                                          @Override
                                          protected String getFallbackBundleName() {
                                            return ApplicationBundle.BUNDLE;
                                          }
                                        });
    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"titleKey"}, Holder.ADVANCED_SETTINGS_EP),
                                        new PropertyKeyReferenceProvider(false, "titleKey", null) {
                                          @Override
                                          protected String getFallbackBundleName() {
                                            return ApplicationBundle.BUNDLE;
                                          }
                                        });
    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"groupKey"}, Holder.ADVANCED_SETTINGS_EP),
                                        new PropertyKeyReferenceProvider(false, "groupKey", null) {
                                          @Override
                                          protected String getFallbackBundleName() {
                                            return ApplicationBundle.BUNDLE;
                                          }
                                        });
    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"descriptionKey"}, Holder.ADVANCED_SETTINGS_EP),
                                        new PropertyKeyReferenceProvider(false, "descriptionKey", null) {
                                          @Override
                                          protected String getFallbackBundleName() {
                                            return ApplicationBundle.BUNDLE;
                                          }
                                        });
    registrar.registerReferenceProvider(extensionAttributePattern(new String[]{"trailingLabelKey"}, Holder.ADVANCED_SETTINGS_EP),
                                        new PropertyKeyReferenceProvider(false, "trailingLabelKey", null) {
                                          @Override
                                          protected String getFallbackBundleName() {
                                            return ApplicationBundle.BUNDLE;
                                          }
                                        });

    final XmlAttributeValuePattern separatorSynonymPattern =
      xmlAttributeValue("key")
        .withSuperParent(2,
                         or(DomPatterns.tagWithDom(SEPARATOR_TAG, Separator.class),
                            DomPatterns.tagWithDom(SYNONYM_TAG, Synonym.class)));
    registrar.registerReferenceProvider(separatorSynonymPattern,
                                        new PropertyKeyReferenceProvider(tag -> {
                                          final DomElement domElement = DomUtil.getDomElement(tag);
                                          if (domElement == null) return null;

                                          final Actions actions = DomUtil.getParentOfType(domElement, Actions.class, true);
                                          return actions != null ? actions.getResourceBundle().getStringValue() : null;
                                        }));

    final XmlTagPattern.Capture intentionActionKeyTagPattern =
      xmlTag().withLocalName("categoryKey").
        withParent(DomPatterns.tagWithDom(INTENTION_ACTION_TAG, Extension.class));
    registrar.registerReferenceProvider(intentionActionKeyTagPattern,
                                        new PropertyKeyReferenceProvider(true, null, INTENTION_ACTION_BUNDLE_TAG));
  }
private static void registerKeyProviders(PsiReferenceRegistrar registrar)