private static void findExtensionPointCandidates(PsiClass psiClass, Set<? super ExtensionPointCandidate> candidates) {
    final Project project = psiClass.getProject();
    final SmartPointerManager instance = SmartPointerManager.getInstance(project);

    final List<ExtensionPoint> extensionPoints =
      ExtensionPointClassIndex.getExtensionPointsByClass(project, psiClass, PluginRelatedLocatorsUtils.getCandidatesScope(project));
    for (ExtensionPoint point : extensionPoints) {
      final SmartPsiElementPointer<XmlTag> pointer = instance.createSmartPsiElementPointer(point.getXmlTag());
      final String effectiveQualifiedName = point.getEffectiveQualifiedName();

      if (DomUtil.hasXml(point.getInterface())) {
        candidates.add(new ExtensionPointCandidate(pointer, effectiveQualifiedName));
        continue;
      }

      String tagName = null;
      String attributeName = null;
      for (With element : point.getWithElements()) {
        if (psiClass.equals(element.getImplements().getValue())) {
          tagName = element.getTag().getStringValue();
          attributeName = element.getAttribute().getStringValue();
          break;
        }
      }

      final ExtensionPointCandidate candidate =
        new ExtensionPointCandidate(pointer,
                                    effectiveQualifiedName,
                                    attributeName, tagName,
                                    point.getBeanClass().getStringValue());
      candidates.add(candidate);
    }
  }
private static void findExtensionPointCandidates(PsiClass psiClass, Set<? super ExtensionPointCandidate> candidates)