List<PsiModifierListOwner> (PsiModifierListOwner owner) { List<PsiModifierListOwner> allOwners = new ArrayList<>(); allOwners.add(owner); if (owner instanceof PsiMethod method) { Collections.addAll(allOwners, method.getParameterList().getParameters()); } return allOwners; }