ProblemDescriptor[] () { PythonIndentingLexer lexer = new PythonIndentingLexer(); final String text = myFile.getText(); lexer.start(text); while (lexer.getTokenType() != null) { final IElementType tokenType = lexer.getTokenType(); if (tokenType == PyTokenTypes.STATEMENT_BREAK) { lexer.advance(); while(lexer.getTokenType() != null && lexer.getTokenType() != PyTokenTypes.LINE_BREAK) { lexer.advance(); } if (lexer.getTokenType() == PyTokenTypes.LINE_BREAK) { String indent = text.substring(lexer.getTokenStart(), lexer.getTokenEnd()); validateIndent(lexer.getTokenStart(), indent); } } lexer.advance(); } return myProblems.toArray(ProblemDescriptor.EMPTY_ARRAY); }