PsiElement (@NotNull PsiModifierListOwner refElement) { for (ContainerProvider provider : ContainerProvider.EP_NAME.getExtensionList()) { PsiElement container = provider.getContainer(refElement); if (container != null) return container; } return refElement.getParent(); }