void (@NotNull KeyedLazyInstance<PsiReferenceContributor> extension, @NotNull PluginDescriptor pluginDescriptor) { Language language = Language.findLanguageByID(extension.getKey()); PsiReferenceContributor instance = extension.getInstance(); if (language == Language.ANY) { for (PsiReferenceRegistrarImpl registrar : myRegistrars.values()) { registerContributedReferenceProviders(registrar, instance); } } else if (language != null) { registerContributorForLanguageAndDialects(language, instance); if (language instanceof MetaLanguage) { Collection<Language> matchingLanguages = ((MetaLanguage)language).getMatchingLanguages(); for (Language matchingLanguage : matchingLanguages) { registerContributorForLanguageAndDialects(matchingLanguage, instance); } } } }