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

The following examples show how to use org.eclipse.jdt.core.dom.ContinueStatement#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: CodeBlock.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
private ContinueStmt visit(ContinueStatement node) {
	int startLine = _cunit.getLineNumber(node.getStartPosition());
	int endLine = _cunit.getLineNumber(node.getStartPosition() + node.getLength());
	ContinueStmt continueStmt = new ContinueStmt(startLine, endLine, node);
	if(node.getLabel() != null){
		continueStmt.setIdentifier(node.getLabel().getFullyQualifiedName());
	}
	return continueStmt;
}
 
Example 2
Source File: JavaASTFlattener.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public boolean visit(final ContinueStatement node) {
  this.appendToBuffer("/* FIXME Unsupported continue statement */ continue");
  this.addProblem(node, "Continue statement is not supported");
  SimpleName _label = node.getLabel();
  boolean _tripleNotEquals = (_label != null);
  if (_tripleNotEquals) {
    this.appendSpaceToBuffer();
    node.getLabel().accept(this);
  }
  this.appendToBuffer(";");
  this.appendLineWrapToBuffer();
  return false;
}
 
Example 3
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(ContinueStatement node) {
	SimpleName label= node.getLabel();
	if (fDefiningLabel != null && isSameLabel(label) && ASTNodes.isParent(label, fDefiningLabel)) {
		fResult.add(label);
	}
	return false;
}
 
Example 4
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 5
Source File: StyledStringVisitor.java    From JDeodorant with MIT License 5 votes vote down vote up
public boolean visit(ContinueStatement stmnt){
	/*
	 * continue [ Identifier ] ;
	 */
	styledString.append("continue", new StyledStringStyler(keywordStyle));
	if (stmnt.getLabel() != null){
		appendSpace();
		handleExpression(stmnt.getLabel());
	}
	appendSemicolon();
	return false;
}
 
Example 6
Source File: CFGContinueNode.java    From JDeodorant with MIT License 4 votes vote down vote up
public CFGContinueNode(AbstractStatement statement) {
	super(statement);
	ContinueStatement continueStatement = (ContinueStatement)statement.getStatement();
	if(continueStatement.getLabel() != null)
		label = continueStatement.getLabel().getIdentifier();
}