@Override
    public @Nullable PsiElement getNameIdentifier() {
      final PsiPatternVariable variable = JavaPsiPatternUtil.getPatternVariable(pattern);
      return variable != null ? variable.getNameIdentifier() : null;
    }
@Override
    public @Nullable PsiElement getNameIdentifier()