Java 类org.eclipse.jdt.core.dom.ContinueStatement 实例源码

项目:jive    文件:StatementVisitor.java   
/**
 * 'continue' [label]
 */
@Override
public boolean visit(final ContinueStatement node)
{
  // loop node parent
  final ASTNode loopNode = ASTTools.enclosingLoopScope(node);
  if (loopNode != null)
  {
    // line of the loop
    final int lineNo = lineStart(loopNode);
    // last line of the loop scope
    final int lineEnd = lineEnd(loopNode);
    // new loop dependence
    appendLoopDependence(lineNo, lineEnd,
        createDependence(LK_CONTINUE, lineStart(node), mdg.parent()));
    // do not visit children
    return false;
  }
  return true;
}
项目:eclipse.jdt.ls    文件:LinkedNodeFinder.java   
@Override
public boolean visit(ContinueStatement node) {
    SimpleName label= node.getLabel();
    if (fDefiningLabel != null && isSameLabel(label) && ASTNodes.isParent(label, fDefiningLabel)) {
        fResult.add(label);
    }
    return false;
}
项目:eclipse.jdt.ls    文件:FlowAnalyzer.java   
@Override
public void endVisit(ContinueStatement node) {
    if (skipNode(node)) {
        return;
    }
    setFlowInfo(node, createBranch(node.getLabel()));
}
项目:che    文件:LinkedNodeFinder.java   
@Override
public boolean visit(ContinueStatement node) {
  SimpleName label = node.getLabel();
  if (fDefiningLabel != null
      && isSameLabel(label)
      && ASTNodes.isParent(label, fDefiningLabel)) {
    fResult.add(label);
  }
  return false;
}
项目:Eclipse-Postfix-Code-Completion    文件:LinkedNodeFinder.java   
@Override
public boolean visit(ContinueStatement node) {
    SimpleName label= node.getLabel();
    if (fDefiningLabel != null && isSameLabel(label) && ASTNodes.isParent(label, fDefiningLabel)) {
        fResult.add(label);
    }
    return false;
}
项目:Eclipse-Postfix-Code-Completion    文件:BreakContinueTargetFinder.java   
private ASTNode getBreakOrContinueNode(ASTNode selectedNode) {
    if (selectedNode instanceof BreakStatement)
        return selectedNode;
    if (selectedNode instanceof ContinueStatement)
        return selectedNode;
    if (selectedNode instanceof SimpleName && selectedNode.getParent() instanceof BreakStatement)
        return selectedNode.getParent();
    if (selectedNode instanceof SimpleName && selectedNode.getParent() instanceof ContinueStatement)
        return selectedNode.getParent();
    return null;
}
项目:Eclipse-Postfix-Code-Completion    文件:BreakContinueTargetFinder.java   
private SimpleName getLabel() {
    if (fIsBreak){
        BreakStatement bs= (BreakStatement) fSelected;
        return bs.getLabel();
    } else {
        ContinueStatement cs= (ContinueStatement) fSelected;
        return cs.getLabel();
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaElementHyperlinkDetector.java   
/**
 * Finds the target for break or continue node.
 * 
 * @param input the editor input
 * @param region the region
 * @return the break or continue target location or <code>null</code> if none
 * @since 3.7
 */
public static OccurrenceLocation findBreakOrContinueTarget(ITypeRoot input, IRegion region) {
    CompilationUnit astRoot= SharedASTProvider.getAST(input, SharedASTProvider.WAIT_NO, null);
    if (astRoot == null)
        return null;

    ASTNode node= NodeFinder.perform(astRoot, region.getOffset(), region.getLength());
    ASTNode breakOrContinueNode= null;
    boolean labelSelected= false;
    if (node instanceof SimpleName) {
        SimpleName simpleName= (SimpleName) node;
        StructuralPropertyDescriptor location= simpleName.getLocationInParent();
        if (location == ContinueStatement.LABEL_PROPERTY || location == BreakStatement.LABEL_PROPERTY) {
            breakOrContinueNode= simpleName.getParent();
            labelSelected= true;
        }
    } else if (node instanceof ContinueStatement || node instanceof BreakStatement)
        breakOrContinueNode= node;

    if (breakOrContinueNode == null)
        return null;

    BreakContinueTargetFinder finder= new BreakContinueTargetFinder();
    if (finder.initialize(astRoot, breakOrContinueNode) == null) {
        OccurrenceLocation[] locations= finder.getOccurrences();
        if (locations != null) {
            if (breakOrContinueNode instanceof BreakStatement && !labelSelected)
                return locations[locations.length - 1]; // points to the end of target statement
            return locations[0]; // points to the beginning of target statement
        }
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ASTFlattener.java   
@Override
public boolean visit(ContinueStatement node) {
    this.fBuffer.append("continue");//$NON-NLS-1$
    if (node.getLabel() != null) {
        this.fBuffer.append(" ");//$NON-NLS-1$
        node.getLabel().accept(this);
    }
    this.fBuffer.append(";");//$NON-NLS-1$
    return false;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:LinkedNodeFinder.java   
@Override
public boolean visit(ContinueStatement node) {
    SimpleName label= node.getLabel();
    if (fDefiningLabel != null && isSameLabel(label) && ASTNodes.isParent(label, fDefiningLabel)) {
        fResult.add(label);
    }
    return false;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:BreakContinueTargetFinder.java   
private ASTNode getBreakOrContinueNode(ASTNode selectedNode) {
    if (selectedNode instanceof BreakStatement)
        return selectedNode;
    if (selectedNode instanceof ContinueStatement)
        return selectedNode;
    if (selectedNode instanceof SimpleName && selectedNode.getParent() instanceof BreakStatement)
        return selectedNode.getParent();
    if (selectedNode instanceof SimpleName && selectedNode.getParent() instanceof ContinueStatement)
        return selectedNode.getParent();
    return null;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:BreakContinueTargetFinder.java   
private SimpleName getLabel() {
    if (fIsBreak){
        BreakStatement bs= (BreakStatement) fSelected;
        return bs.getLabel();
    } else {
        ContinueStatement cs= (ContinueStatement) fSelected;
        return cs.getLabel();
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaElementHyperlinkDetector.java   
/**
 * Finds the target for break or continue node.
 * 
 * @param input the editor input
 * @param region the region
 * @return the break or continue target location or <code>null</code> if none
 * @since 3.7
 */
public static OccurrenceLocation findBreakOrContinueTarget(ITypeRoot input, IRegion region) {
    CompilationUnit astRoot= SharedASTProvider.getAST(input, SharedASTProvider.WAIT_NO, null);
    if (astRoot == null)
        return null;

    ASTNode node= NodeFinder.perform(astRoot, region.getOffset(), region.getLength());
    ASTNode breakOrContinueNode= null;
    boolean labelSelected= false;
    if (node instanceof SimpleName) {
        SimpleName simpleName= (SimpleName) node;
        StructuralPropertyDescriptor location= simpleName.getLocationInParent();
        if (location == ContinueStatement.LABEL_PROPERTY || location == BreakStatement.LABEL_PROPERTY) {
            breakOrContinueNode= simpleName.getParent();
            labelSelected= true;
        }
    } else if (node instanceof ContinueStatement || node instanceof BreakStatement)
        breakOrContinueNode= node;

    if (breakOrContinueNode == null)
        return null;

    BreakContinueTargetFinder finder= new BreakContinueTargetFinder();
    if (finder.initialize(astRoot, breakOrContinueNode) == null) {
        OccurrenceLocation[] locations= finder.getOccurrences();
        if (locations != null) {
            if (breakOrContinueNode instanceof BreakStatement && !labelSelected)
                return locations[locations.length - 1]; // points to the end of target statement
            return locations[0]; // points to the beginning of target statement
        }
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:NaiveASTFlattener.java   
public boolean visit(ContinueStatement node) {
    printIndent();
    this.buffer.append("continue");//$NON-NLS-1$
    if (node.getLabel() != null) {
        this.buffer.append(" ");//$NON-NLS-1$
        node.getLabel().accept(this);
    }
    this.buffer.append(";\n");//$NON-NLS-1$
    return false;
}
项目:asup    文件:JDTStatementWriter.java   
@SuppressWarnings("unchecked")
@Override
public boolean visit(QContinue statement) {

    Block block = blocks.peek();

    ContinueStatement continueSt = ast.newContinueStatement();
    block.statements().add(continueSt);

    return false;
}
项目:eclipse.jdt.ls    文件:ImportReferencesCollector.java   
@Override
public boolean visit(ContinueStatement node) {
    return false;
}
项目:evosuite    文件:LoggingVisitor.java   
/** {@inheritDoc} */
@Override
public void endVisit(ContinueStatement node) {
    logger.warn("Method endVisitContinueStatement for " + node + " for " + node + " not implemented!");
    super.endVisit(node);
}
项目:evosuite    文件:LoggingVisitor.java   
/** {@inheritDoc} */
@Override
public boolean visit(ContinueStatement node) {
    logger.warn("Method visitContinueStatement for " + node + " for " + node + " not implemented!");
    return super.visit(node);
}
项目:Convert-For-Each-Loop-to-Lambda-Expression-Eclipse-Plugin    文件:EnhancedForStatementVisitor.java   
@Override
public boolean visit(ContinueStatement node) {
    this.encounteredContinueStatement = true;
    return super.visit(node);
}
项目:Beagle    文件:BreakingStatementDetector.java   
@Override
public boolean visit(final ContinueStatement node) {
    return this.found();
}
项目:Beagle    文件:NotRecursingAstVisitor.java   
@Override
public boolean visit(final ContinueStatement node) {
    return false;
}
项目:Beagle    文件:InstrumentableAstNodeLister.java   
@Override
public boolean visit(final ContinueStatement node) {
    return this.visitInstrumentable(node);
}
项目:Eclipse-Postfix-Code-Completion    文件:FlowAnalyzer.java   
@Override
public void endVisit(ContinueStatement node) {
    if (skipNode(node))
        return;
    setFlowInfo(node, createBranch(node.getLabel()));
}
项目:Eclipse-Postfix-Code-Completion    文件:AstMatchingNodeFinder.java   
@Override
public boolean visit(ContinueStatement node) {
    if (node.subtreeMatch(fMatcher, fNodeToMatch))
        return matches(node);
    return super.visit(node);
}
项目:Eclipse-Postfix-Code-Completion    文件:ConstraintCollector.java   
@Override
public boolean visit(ContinueStatement node) {
    add(fCreator.create(node));
    return true;
}
项目:Eclipse-Postfix-Code-Completion    文件:GenericVisitor.java   
@Override
public void endVisit(ContinueStatement node) {
    endVisitNode(node);
}
项目:Eclipse-Postfix-Code-Completion    文件:GenericVisitor.java   
@Override
public boolean visit(ContinueStatement node) {
    return visitNode(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:FlowAnalyzer.java   
@Override
public void endVisit(ContinueStatement node) {
    if (skipNode(node))
        return;
    setFlowInfo(node, createBranch(node.getLabel()));
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:AstMatchingNodeFinder.java   
@Override
public boolean visit(ContinueStatement node) {
    if (node.subtreeMatch(fMatcher, fNodeToMatch))
        return matches(node);
    return super.visit(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ConstraintCollector.java   
@Override
public boolean visit(ContinueStatement node) {
    add(fCreator.create(node));
    return true;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:HierarchicalASTVisitor.java   
@Override
public boolean visit(ContinueStatement node) {
    return visit((Statement)node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:HierarchicalASTVisitor.java   
@Override
public void endVisit(ContinueStatement node) {
    endVisit((Statement)node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:GenericVisitor.java   
@Override
public boolean visit(ContinueStatement node) {
    return visitNode(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:GenericVisitor.java   
@Override
public void endVisit(ContinueStatement node) {
    endVisitNode(node);
}
项目:eclipse-i18ntools    文件:ASTNodeFinder.java   
@Override
public boolean visit(final ContinueStatement node) {
    return this.internalVisit(node);
}
项目:repositoryminer    文件:MethodVisitor.java   
@Override
public boolean visit(ContinueStatement node) {
    statements.add(new AbstractStatement(NodeType.CONTINUE, null));
    return true;
}
项目:j2d    文件:J2dVisitor.java   
@Override
public boolean visit(ContinueStatement node) {
    //System.out.println("Found: " + node.getClass());
    println("continue;");
    return false;
}
项目:Eclipse-Postfix-Code-Completion    文件:ConstraintCreator.java   
/**
 * @param node the AST node
 * @return array of type constraints, may be empty
 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ContinueStatement)
 */
public ITypeConstraint[] create(ContinueStatement node) {
    return EMPTY_ARRAY;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ConstraintCreator.java   
/**
 * @param node the AST node
 * @return array of type constraints, may be empty
 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ContinueStatement)
 */
public ITypeConstraint[] create(ContinueStatement node) {
    return EMPTY_ARRAY;
}
项目:Slicer    文件:AliasVisitor.java   
public boolean visit(ContinueStatement node){return this.visitStatement(node);}