@Override public void visitBreakStatement(@NotNull PsiBreakStatement statement) { super.visitBreakStatement(statement); final PsiIdentifier labelIdentifier = statement.getLabelIdentifier(); if (labelIdentifier == null) { return; } final String labelText = labelIdentifier.getText(); if (labelText == null) { return; } if (labelText.length() == 0) { return; } registerStatementError(statement); }
@Override public void visitBreakStatement(@NotNull PsiBreakStatement statement) { super.visitBreakStatement(statement); if (!ControlFlowUtils.isInFinallyBlock(statement)) { return; } final PsiStatement exitedStatement = statement.findExitedStatement(); if (exitedStatement == null) { return; } if (ControlFlowUtils.isInFinallyBlock(exitedStatement)) { return; } registerStatementError(statement); }
@Override public void visitBreakStatement(PsiBreakStatement statement) { mVisitor.report("PsiBreakStatement", statement.getText(), statement); super.visitStatement(statement); }