private void annotateExtension(Extension extension, DomElementAnnotationHolder holder) { final ExtensionPoint extensionPoint = extension.getExtensionPoint(); if (extensionPoint == null) { return; } final GenericAttributeValue<PsiClass> interfaceAttribute = extensionPoint.getInterface(); if (!DomUtil.hasXml(interfaceAttribute)) { return; } final PsiClass value = interfaceAttribute.getValue(); if (value != null && value.isDeprecated()) { final Annotation annotation = holder.createAnnotation(extension, HighlightSeverity.WARNING, "Deprecated EP"); annotation.setHighlightType(ProblemHighlightType.LIKE_DEPRECATED); } }
private static String calculateAnyLanguageId(ConvertContext context) { final Extension extension = context.getInvocationElement().getParentOfType(Extension.class, true); if (extension == null) { return ANY_LANGUAGE_DEFAULT_ID; } final ExtensionPoint extensionPoint = extension.getExtensionPoint(); if (extensionPoint == null) { return ANY_LANGUAGE_DEFAULT_ID; } final GenericAttributeValue<PsiClass> epBeanClass = extensionPoint.getBeanClass(); if (CompletionContributorEP.class.getName().equals(epBeanClass.getStringValue())) { return "any"; } return ANY_LANGUAGE_DEFAULT_ID; }