Example #1
0
  @NotNull
  public static Map<PsiMethod, SiblingInfo> getSiblingInheritanceInfos(
      @NotNull final Collection<PsiMethod> methods) {
    MultiMap<PsiClass, PsiMethod> byClass = MultiMap.create();
    for (PsiMethod method : methods) {
      PsiClass containingClass = method.getContainingClass();
      if (canHaveSiblingSuper(method, containingClass)) {
        byClass.putValue(containingClass, method);
      }
    }

    Map<PsiMethod, SiblingInfo> result = new HashMap<>();
    for (PsiClass psiClass : byClass.keySet()) {
      SiblingInheritorSearcher searcher =
          new SiblingInheritorSearcher(byClass.get(psiClass), psiClass);
      ClassInheritorsSearch.search(psiClass, psiClass.getUseScope(), true, true, false)
          .forEach(searcher);
      result.putAll(searcher.getResult());
    }
    return result;
  }
 public void registerNestedSession(InferenceSession session) {
   myNestedSessions.put(session.getContext(), session);
   myNestedSessions.putAll(session.getInferenceSessionContainer().myNestedSessions);
 }
 public void addAllPersistentEntries(EntryPointsManagerBase manager) {
   myPersistentEntryPoints.putAll(manager.myPersistentEntryPoints);
   myPatterns.addAll(manager.getPatterns());
 }