PsiPrimaryPattern (@Nullable PsiCaseLabelElement element) { if (element instanceof PsiParenthesizedPattern) { return getTypedPattern(((PsiParenthesizedPattern)element).getPattern()); } else if (element instanceof PsiDeconstructionPattern) { return ((PsiDeconstructionPattern)element); } else if (element instanceof PsiTypeTestPattern) { return ((PsiTypeTestPattern)element); } else { return null; } }