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

项目:eclipse.jdt.ls    文件:NecessaryParenthesesChecker.java   
private static boolean locationNeedsParentheses(StructuralPropertyDescriptor locationInParent) {
    if (locationInParent instanceof ChildListPropertyDescriptor && locationInParent != InfixExpression.EXTENDED_OPERANDS_PROPERTY) {
        // e.g. argument lists of MethodInvocation, ClassInstanceCreation, dimensions of ArrayCreation ...
        return false;
    }
    if (locationInParent == VariableDeclarationFragment.INITIALIZER_PROPERTY
            || locationInParent == SingleVariableDeclaration.INITIALIZER_PROPERTY
            || locationInParent == ReturnStatement.EXPRESSION_PROPERTY
            || locationInParent == EnhancedForStatement.EXPRESSION_PROPERTY
            || locationInParent == ForStatement.EXPRESSION_PROPERTY
            || locationInParent == WhileStatement.EXPRESSION_PROPERTY
            || locationInParent == DoStatement.EXPRESSION_PROPERTY
            || locationInParent == AssertStatement.EXPRESSION_PROPERTY
            || locationInParent == AssertStatement.MESSAGE_PROPERTY
            || locationInParent == IfStatement.EXPRESSION_PROPERTY
            || locationInParent == SwitchStatement.EXPRESSION_PROPERTY
            || locationInParent == SwitchCase.EXPRESSION_PROPERTY
            || locationInParent == ArrayAccess.INDEX_PROPERTY
            || locationInParent == ThrowStatement.EXPRESSION_PROPERTY
            || locationInParent == SynchronizedStatement.EXPRESSION_PROPERTY
            || locationInParent == ParenthesizedExpression.EXPRESSION_PROPERTY) {
        return false;
    }
    return true;
}
项目:che    文件:NecessaryParenthesesChecker.java   
private static boolean locationNeedsParentheses(StructuralPropertyDescriptor locationInParent) {
  if (locationInParent instanceof ChildListPropertyDescriptor
      && locationInParent != InfixExpression.EXTENDED_OPERANDS_PROPERTY) {
    // e.g. argument lists of MethodInvocation, ClassInstanceCreation, dimensions of ArrayCreation
    // ...
    return false;
  }
  if (locationInParent == VariableDeclarationFragment.INITIALIZER_PROPERTY
      || locationInParent == SingleVariableDeclaration.INITIALIZER_PROPERTY
      || locationInParent == ReturnStatement.EXPRESSION_PROPERTY
      || locationInParent == EnhancedForStatement.EXPRESSION_PROPERTY
      || locationInParent == ForStatement.EXPRESSION_PROPERTY
      || locationInParent == WhileStatement.EXPRESSION_PROPERTY
      || locationInParent == DoStatement.EXPRESSION_PROPERTY
      || locationInParent == AssertStatement.EXPRESSION_PROPERTY
      || locationInParent == AssertStatement.MESSAGE_PROPERTY
      || locationInParent == IfStatement.EXPRESSION_PROPERTY
      || locationInParent == SwitchStatement.EXPRESSION_PROPERTY
      || locationInParent == SwitchCase.EXPRESSION_PROPERTY
      || locationInParent == ArrayAccess.INDEX_PROPERTY
      || locationInParent == ThrowStatement.EXPRESSION_PROPERTY
      || locationInParent == SynchronizedStatement.EXPRESSION_PROPERTY
      || locationInParent == ParenthesizedExpression.EXPRESSION_PROPERTY) {
    return false;
  }
  return true;
}
项目:Eclipse-Postfix-Code-Completion    文件:NecessaryParenthesesChecker.java   
private static boolean locationNeedsParentheses(StructuralPropertyDescriptor locationInParent) {
    if (locationInParent instanceof ChildListPropertyDescriptor && locationInParent != InfixExpression.EXTENDED_OPERANDS_PROPERTY) {
        // e.g. argument lists of MethodInvocation, ClassInstanceCreation, dimensions of ArrayCreation ...
        return false;
    }
    if (locationInParent == VariableDeclarationFragment.INITIALIZER_PROPERTY
            || locationInParent == SingleVariableDeclaration.INITIALIZER_PROPERTY
            || locationInParent == ReturnStatement.EXPRESSION_PROPERTY
            || locationInParent == EnhancedForStatement.EXPRESSION_PROPERTY
            || locationInParent == ForStatement.EXPRESSION_PROPERTY
            || locationInParent == WhileStatement.EXPRESSION_PROPERTY
            || locationInParent == DoStatement.EXPRESSION_PROPERTY
            || locationInParent == AssertStatement.EXPRESSION_PROPERTY
            || locationInParent == AssertStatement.MESSAGE_PROPERTY
            || locationInParent == IfStatement.EXPRESSION_PROPERTY
            || locationInParent == SwitchStatement.EXPRESSION_PROPERTY
            || locationInParent == SwitchCase.EXPRESSION_PROPERTY
            || locationInParent == ArrayAccess.INDEX_PROPERTY
            || locationInParent == ThrowStatement.EXPRESSION_PROPERTY
            || locationInParent == SynchronizedStatement.EXPRESSION_PROPERTY
            || locationInParent == ParenthesizedExpression.EXPRESSION_PROPERTY) {
        return false;
    }
    return true;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:NecessaryParenthesesChecker.java   
private static boolean locationNeedsParentheses(StructuralPropertyDescriptor locationInParent) {
    if (locationInParent instanceof ChildListPropertyDescriptor && locationInParent != InfixExpression.EXTENDED_OPERANDS_PROPERTY) {
        // e.g. argument lists of MethodInvocation, ClassInstanceCreation, dimensions of ArrayCreation ...
        return false;
    }
    if (locationInParent == VariableDeclarationFragment.INITIALIZER_PROPERTY
            || locationInParent == SingleVariableDeclaration.INITIALIZER_PROPERTY
            || locationInParent == ReturnStatement.EXPRESSION_PROPERTY
            || locationInParent == EnhancedForStatement.EXPRESSION_PROPERTY
            || locationInParent == ForStatement.EXPRESSION_PROPERTY
            || locationInParent == WhileStatement.EXPRESSION_PROPERTY
            || locationInParent == DoStatement.EXPRESSION_PROPERTY
            || locationInParent == AssertStatement.EXPRESSION_PROPERTY
            || locationInParent == AssertStatement.MESSAGE_PROPERTY
            || locationInParent == IfStatement.EXPRESSION_PROPERTY
            || locationInParent == SwitchStatement.EXPRESSION_PROPERTY
            || locationInParent == SwitchCase.EXPRESSION_PROPERTY
            || locationInParent == ArrayAccess.INDEX_PROPERTY
            || locationInParent == ThrowStatement.EXPRESSION_PROPERTY
            || locationInParent == SynchronizedStatement.EXPRESSION_PROPERTY
            || locationInParent == ParenthesizedExpression.EXPRESSION_PROPERTY) {
        return false;
    }
    return true;
}
项目:eclipse.jdt.ls    文件:FlowAnalyzer.java   
@Override
public void endVisit(SynchronizedStatement node) {
    if (skipNode(node)) {
        return;
    }
    GenericSequentialFlowInfo info = processSequential(node, node.getExpression());
    process(info, node.getBody());
}
项目:eclipse.jdt.ls    文件:StatementAnalyzer.java   
@Override
public void endVisit(SynchronizedStatement node) {
    ASTNode firstSelectedNode = getFirstSelectedNode();
    if (getSelection().getEndVisitSelectionMode(node) == Selection.SELECTED) {
        if (firstSelectedNode == node.getBody()) {
            invalidSelection(RefactoringCoreMessages.StatementAnalyzer_synchronized_statement);
        }
    }
    super.endVisit(node);
}
项目:eclipse-astparser    文件:Synchronized.java   
@Override
protected ResultVisitor createResultVisitor() 
{
    return new ResultVisitor() {
        @Override
        public boolean visit(final SynchronizedStatement node) {
            setMatch(true); //synchronized statement gefunden
            setMatchedNode(node);
            return true;
        }       
    };
}
项目:che    文件:StatementAnalyzer.java   
@Override
public void endVisit(SynchronizedStatement node) {
  ASTNode firstSelectedNode = getFirstSelectedNode();
  if (getSelection().getEndVisitSelectionMode(node) == Selection.SELECTED) {
    if (firstSelectedNode == node.getBody()) {
      invalidSelection(RefactoringCoreMessages.StatementAnalyzer_synchronized_statement);
    }
  }
  super.endVisit(node);
}
项目:Slicer    文件:FDDSeedVisitor.java   
/**
 * We don't really need anything in particular from this statement,
 * but since it has an expression and a body, we only want to 
 * investigate the expression part to determine if it needs to
 * be in the slice.
 */
public boolean visit(SynchronizedStatement node){
    if(this.options.contains(Slicer.Options.CONTROL_EXPRESSIONS_ONLY)){
        /* Visit the expression part. */
        node.getExpression().accept(this);
        /* Don't visit the children. */
        return false;
    }
    else return true;
}
项目:Slicer    文件:FDDVisitor.java   
/**
 * We want to track the variables from the expression only.
 */
public boolean visit(SynchronizedStatement node){
    /* Visit the expression part. */
    node.getExpression().accept(this);
    /* Don't visit the children. */
    return false;   
}
项目:Slicer    文件:BDDVisitor.java   
/**
 * We don't really need anything in particular from this statement,
 * but since it has an expression and a body, we only want to 
 * investigate the expression part to determine if it needs to
 * be in the slice.
 */
public boolean visit(SynchronizedStatement node){
    if(this.options.contains(Slicer.Options.CONTROL_EXPRESSIONS_ONLY)){
        /* Visit the expression part. */
        node.getExpression().accept(this);
        /* Don't visit the children. */
        return false;
    }
    else return true;
}
项目:Slicer    文件:BDDSeedVisitor.java   
/**
 * We want to track the variables from the expression only.
 */
public boolean visit(SynchronizedStatement node){
    /* Visit the expression part. */
    node.getExpression().accept(this);
    /* Don't visit the children. */
    return false;   
}
项目:Eclipse-Postfix-Code-Completion    文件:FlowAnalyzer.java   
@Override
public void endVisit(SynchronizedStatement node) {
    if (skipNode(node))
        return;
    GenericSequentialFlowInfo info= processSequential(node, node.getExpression());
    process(info, node.getBody());
}
项目:Eclipse-Postfix-Code-Completion    文件:StatementAnalyzer.java   
@Override
public void endVisit(SynchronizedStatement node) {
    ASTNode firstSelectedNode= getFirstSelectedNode();
    if (getSelection().getEndVisitSelectionMode(node) == Selection.SELECTED) {
        if (firstSelectedNode == node.getBody()) {
            invalidSelection(RefactoringCoreMessages.StatementAnalyzer_synchronized_statement);
        }
    }
    super.endVisit(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:FlowAnalyzer.java   
@Override
public void endVisit(SynchronizedStatement node) {
    if (skipNode(node))
        return;
    GenericSequentialFlowInfo info= processSequential(node, node.getExpression());
    process(info, node.getBody());
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:StatementAnalyzer.java   
@Override
public void endVisit(SynchronizedStatement node) {
    ASTNode firstSelectedNode= getFirstSelectedNode();
    if (getSelection().getEndVisitSelectionMode(node) == Selection.SELECTED) {
        if (firstSelectedNode == node.getBody()) {
            invalidSelection(RefactoringCoreMessages.StatementAnalyzer_synchronized_statement);
        }
    }
    super.endVisit(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ASTFlattener.java   
@Override
public boolean visit(SynchronizedStatement node) {
    this.fBuffer.append("synchronized (");//$NON-NLS-1$
    node.getExpression().accept(this);
    this.fBuffer.append(") ");//$NON-NLS-1$
    node.getBody().accept(this);
    return false;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:NaiveASTFlattener.java   
public boolean visit(SynchronizedStatement node) {
    this.buffer.append("synchronized (");//$NON-NLS-1$
    node.getExpression().accept(this);
    this.buffer.append(") ");//$NON-NLS-1$
    node.getBody().accept(this);
    return false;
}
项目:jive    文件:StatementVisitor.java   
/**
 * 'synchronized' '(' Expression ')' Block
 */
@Override
public boolean visit(final SynchronizedStatement node)
{
  visitControlNode(LK_SYNCHRONIZED, lineStart(node), node.getExpression(), node.getBody());
  // do not visit children
  return false;
}
项目:j2d    文件:J2dVisitor.java   
@Override
public boolean visit(SynchronizedStatement node) {
    //System.out.println("Found: " + node.getClass());
    print("synchronized (");
    node.getExpression().accept(this);
    println(") {");
    indent++;
    node.getBody().accept(this);
    indent--;
    println("}");
    return false;
}
项目:bayou    文件:DOMSynchronizedStatement.java   
public DOMSynchronizedStatement(SynchronizedStatement statement) {
    this.statement = statement;
}
项目:evosuite    文件:LoggingVisitor.java   
/** {@inheritDoc} */
@Override
public void endVisit(SynchronizedStatement node) {
    logger.warn("Method endVisitSynchronizedStatement for " + node + " for " + node + " not implemented!");
    super.endVisit(node);
}
项目:evosuite    文件:LoggingVisitor.java   
/** {@inheritDoc} */
@Override
public boolean visit(SynchronizedStatement node) {
    logger.warn("Method visitSynchronizedStatement for " + node + " not implemented!");
    return super.visit(node);
}
项目:Beagle    文件:NotRecursingAstVisitor.java   
@Override
public boolean visit(final SynchronizedStatement node) {
    return false;
}
项目:Beagle    文件:InstrumentableAstNodeLister.java   
@Override
public boolean visit(final SynchronizedStatement node) {
    // not instrumentable, may contain instrumentable nodes
    return true;
}
项目:jdt2famix    文件:AstVisitor.java   
/**
 * Handles
 *      synchronized(a) {}
 */
@Override
public boolean visit(SynchronizedStatement node) {
    importer.createAccessFromExpression((Expression) node.getExpression());     
    return true;
}
项目:Eclipse-Postfix-Code-Completion    文件:AstMatchingNodeFinder.java   
@Override
public boolean visit(SynchronizedStatement node) {
    if (node.subtreeMatch(fMatcher, fNodeToMatch))
        return matches(node);
    return super.visit(node);
}
项目:Eclipse-Postfix-Code-Completion    文件:ConstraintCollector.java   
@Override
public boolean visit(SynchronizedStatement node) {
    add(fCreator.create(node));
    return true;
}
项目:Eclipse-Postfix-Code-Completion    文件:GenericVisitor.java   
@Override
public void endVisit(SynchronizedStatement node) {
    endVisitNode(node);
}
项目:Eclipse-Postfix-Code-Completion    文件:GenericVisitor.java   
@Override
public boolean visit(SynchronizedStatement node) {
    return visitNode(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:AstMatchingNodeFinder.java   
@Override
public boolean visit(SynchronizedStatement node) {
    if (node.subtreeMatch(fMatcher, fNodeToMatch))
        return matches(node);
    return super.visit(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ConstraintCollector.java   
@Override
public boolean visit(SynchronizedStatement node) {
    add(fCreator.create(node));
    return true;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:HierarchicalASTVisitor.java   
@Override
public boolean visit(SynchronizedStatement node) {
    return visit((Statement)node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:HierarchicalASTVisitor.java   
@Override
public void endVisit(SynchronizedStatement node) {
    endVisit((Statement)node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:GenericVisitor.java   
@Override
public boolean visit(SynchronizedStatement node) {
    return visitNode(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:GenericVisitor.java   
@Override
public void endVisit(SynchronizedStatement node) {
    endVisitNode(node);
}
项目:eclipse-i18ntools    文件:ASTNodeFinder.java   
@Override
public boolean visit(final SynchronizedStatement node) {
    return this.internalVisit(node);
}
项目: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.SynchronizedStatement)
 */
public ITypeConstraint[] create(SynchronizedStatement 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.SynchronizedStatement)
 */
public ITypeConstraint[] create(SynchronizedStatement node) {
    return EMPTY_ARRAY;
}
项目:Slicer    文件:AliasVisitor.java   
public boolean visit(SynchronizedStatement node){return this.visitStatement(node);}