Java 类com.intellij.psi.PsiBreakStatement 实例源码

项目:intellij-ce-playground    文件:BreakStatementWithLabelInspection.java   
@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);
}
项目:tools-idea    文件:BreakStatementWithLabelInspection.java   
@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);
}
项目:consulo-java    文件:BreakStatementWithLabelInspection.java   
@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);
}
项目:intellij-ce-playground    文件:ContinueOrBreakFromFinallyBlockInspection.java   
@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);
}
项目:tools-idea    文件:ContinueOrBreakFromFinallyBlockInspection.java   
@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);
}
项目:consulo-java    文件:ContinueOrBreakFromFinallyBlockInspection.java   
@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);
}
项目:Android_Lint_SRP_Practice_Example    文件:PsiClassStructureDetector.java   
@Override
public void visitBreakStatement(PsiBreakStatement statement) {
    mVisitor.report("PsiBreakStatement", statement.getText(), statement);
    super.visitStatement(statement);
}