Java Code Examples for org.eclipse.jdt.core.dom.BreakStatement#getLabel()

The following examples show how to use org.eclipse.jdt.core.dom.BreakStatement#getLabel() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JavaASTFlattener.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public boolean visit(final BreakStatement node) {
  StringConcatenation _builder = new StringConcatenation();
  _builder.append("/* FIXME Unsupported BreakStatement */ break");
  this.appendToBuffer(_builder.toString());
  this.addProblem(node, "Break statement is not supported");
  SimpleName _label = node.getLabel();
  boolean _tripleNotEquals = (_label != null);
  if (_tripleNotEquals) {
    this.appendSpaceToBuffer();
    node.getLabel().accept(this);
  }
  return false;
}
 
Example 2
Source File: LinkedNodeFinder.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public boolean visit(BreakStatement node) {
	SimpleName label= node.getLabel();
	if (fDefiningLabel != null && isSameLabel(label) && ASTNodes.isParent(label, fDefiningLabel)) {
		fResult.add(label);
	}
	return false;
}
 
Example 3
Source File: BreakContinueTargetFinder.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private SimpleName getLabel() {
	if (fIsBreak){
		BreakStatement bs= (BreakStatement) fSelected;
		return bs.getLabel();
	} else {
		ContinueStatement cs= (ContinueStatement) fSelected;
		return cs.getLabel();
	}
}
 
Example 4
Source File: StyledStringVisitor.java    From JDeodorant with MIT License 5 votes vote down vote up
public boolean visit(BreakStatement stmnt) {
	/*
	 * break [ Identifier ] ;
	 */
	styledString.append("break", new StyledStringStyler(keywordStyle));
	if (stmnt.getLabel() != null) {
		appendSpace();
		handleExpression(stmnt.getLabel());
	}
	appendSemicolon();
	return false;
}
 
Example 5
Source File: CFGBreakNode.java    From JDeodorant with MIT License 4 votes vote down vote up
public CFGBreakNode(AbstractStatement statement) {
	super(statement);
	BreakStatement breakStatement = (BreakStatement)statement.getStatement();
	if(breakStatement.getLabel() != null)
		label = breakStatement.getLabel().getIdentifier();
}