示例#1
0
 @Override
 public boolean visit(SuperConstructorInvocation node) {
   IMethodBinding binding = node.resolveConstructorBinding();
   List args = node.arguments();
   handleMethodCall(node, binding, args);
   return super.visit(node);
 }
  /**
   * Find invocations of the supertype's constructor from the called method (=constructor). Since we
   * only traverse into the AST on the wanted method declaration, this method should not hit on more
   * method invocations than those in the wanted method.
   *
   * @see
   *     org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SuperConstructorInvocation)
   */
  public boolean visit(SuperConstructorInvocation node) {
    progressMonitorWorked(1);
    if (!isFurtherTraversalNecessary(node)) {
      return false;
    }

    if (isNodeWithinMethod(node)) {
      addMethodCall(node.resolveConstructorBinding(), node);
    }

    return true;
  }
 /*
  * @see edu.berkeley.eduride.isa.corext.dom.GenericVisitor#visit(org.eclipse.jdt.core.dom.ConstructorInvocation)
  * @since 3.5
  */
 public boolean visit(SuperConstructorInvocation node) {
   // XXX Hack for performance reasons (should loop over fJobSemanticHighlightings can call
   // consumes(*))
   if (fJobDeprecatedMemberHighlighting != null) {
     IMethodBinding constructorBinding = node.resolveConstructorBinding();
     if (constructorBinding != null && constructorBinding.isDeprecated()) {
       int offset = node.getStartPosition();
       int length = 5;
       if (offset > -1 && length > 0)
         addPosition(offset, length, fJobDeprecatedMemberHighlighting);
     }
   }
   return true;
 }