void (@NotNull PsiReferenceRegistrar registrar) { registerClassAttributeReference(registrar, PyNames.ALL, new PsiReferenceProvider() { @Override public PsiReference @NotNull [] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) { return new PsiReference[]{new PyDunderAllReference((PyStringLiteralExpression)element)}; } }); registerClassAttributeReference(registrar, PyNames.SLOTS, new PsiReferenceProvider() { @Override public PsiReference @NotNull [] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) { return new PsiReference[]{new PyDunderSlotsReference((PyStringLiteralExpression)element)}; } }); }