List<GrParameterListOwner> (@NotNull InitialInfo initialInfo) { PsiElement place = initialInfo.getContext(); final List<GrParameterListOwner> scopes = new ArrayList<>(); while (true) { final GrParameterListOwner parent = PsiTreeUtil.getParentOfType(place, GrParameterListOwner.class); if (parent == null) break; scopes.add(parent); place = parent; } return scopes; }