ValidationResultType (@NotNull String data, @NotNull EventContext context) { if (StringUtil.equals(data, CUSTOM) || StringUtil.equals(data, NO_PROVIDER)) return ValidationResultType.ACCEPTED; final Language lang = getLanguage(context); if (lang == null) return ValidationResultType.REJECTED; final String provider = getEventDataField(context, PROVIDER.getName()); final String template = getEventDataField(context, TEMPLATE.getName()); if (provider == null || template == null || !isProviderOrTemplate(data, provider, template)) { return ValidationResultType.REJECTED; } final Pair<PostfixTemplate, PostfixTemplateProvider> result = findPostfixTemplate(lang, provider, template); if (result.getFirst() != null && result.getSecond() != null) { final PluginInfo templateInfo = PluginInfoDetectorKt.getPluginInfo(result.getFirst().getClass()); final PluginInfo providerInfo = PluginInfoDetectorKt.getPluginInfo(result.getSecond().getClass()); return templateInfo.isDevelopedByJetBrains() && providerInfo.isDevelopedByJetBrains() ? ValidationResultType.ACCEPTED : ValidationResultType.THIRD_PARTY; } return ValidationResultType.REJECTED; }