TextRange (Project project, Editor editor, PsiElement container, PsiElement[] statements) { PsiIfStatement ifStatement = surroundStatements(project, container, statements, ""); if (ifStatement == null) return null; ifStatement = CodeInsightUtilCore.forcePsiPostprocessAndRestoreElement(ifStatement); if (ifStatement == null) return null; final PsiJavaToken lParenth = ifStatement.getLParenth(); assert lParenth != null; final TextRange range = lParenth.getTextRange(); return new TextRange(range.getEndOffset(), range.getEndOffset()); }