Package org.eclipse.jdt.internal.compiler.util

Examples of org.eclipse.jdt.internal.compiler.util.ObjectVector


 
      Scope scope = this.assistScope;
      ASTNode astNode = this.assistNode;
      boolean notInJavadoc = this.completionContext.javadoc == 0;
 
      this.visibleLocalVariables = new ObjectVector();
      this.visibleFields = new ObjectVector();
      this.visibleMethods = new ObjectVector();
 
      ReferenceContext referenceContext = scope.referenceContext();
      if (referenceContext instanceof AbstractMethodDeclaration) {
        // completion is inside a method body
        searchVisibleVariablesAndMethods(scope, this.visibleLocalVariables, this.visibleFields, this.visibleMethods, notInJavadoc);
View Full Code Here


      InvocationSite invocationSite,
      Scope invocationScope,
      boolean onlyStaticFields,
      ObjectVector localsFound,
      ObjectVector fieldsFound) {
    ObjectVector newFieldsFound = new ObjectVector();
    // Inherited fields which are hidden by subclasses are filtered out
    // No visibility checks can be performed without the scope & invocationSite

    next : for (int f = fields.length; --f >= 0;) {
      FieldBinding field = fields[f];

      if (field.isSynthetic()) continue next;

      if (onlyStaticFields && !field.isStatic()) continue next;

      if (!field.canBeSeenBy(receiverType, invocationSite, scope)) continue next;

      for (int i = fieldsFound.size; --i >= 0;) {
        FieldBinding otherField = (FieldBinding) fieldsFound.elementAt(i);
        if (CharOperation.equals(field.name, otherField.name, true)) {
          continue next;
        }
      }

      for (int l = localsFound.size; --l >= 0;) {
        LocalVariableBinding local = (LocalVariableBinding) localsFound.elementAt(l);

        if (CharOperation.equals(field.name, local.name, true)) {
          continue next;
        }
      }

      newFieldsFound.add(field);
    }

    fieldsFound.addAll(newFieldsFound);
  }
View Full Code Here

      Scope scope,
      InvocationSite invocationSite,
      Scope invocationScope,
      boolean onlyStaticMethods,
      ObjectVector methodsFound) {
    ObjectVector newMethodsFound =  new ObjectVector();
    // Inherited methods which are hidden by subclasses are filtered out
    // No visibility checks can be performed without the scope & invocationSite

    next : for (int f = methods.length; --f >= 0;) {
      MethodBinding method = methods[f];

      if (method.isSynthetic()) continue next;

      if (method.isDefaultAbstract())  continue next;

      if (method.isConstructor()) continue next;

      if (onlyStaticMethods && !method.isStatic()) continue next;

      if (!method.canBeSeenBy(receiverType, invocationSite, scope)) continue next;

      for (int i = methodsFound.size; --i >= 0;) {
        MethodBinding otherMethod = (MethodBinding) methodsFound.elementAt(i);
        if (method == otherMethod)
          continue next;

        if (CharOperation.equals(method.selector, otherMethod.selector, true)) {
          if (this.lookupEnvironment.methodVerifier().isMethodSubsignature(otherMethod, method)) {
            continue next;
          }
        }
      }

      newMethodsFound.add(method);
    }

    methodsFound.addAll(newMethodsFound);
  }
View Full Code Here

          break;
      }
    }
   
    if(this.acceptedConstructors == null) {
      this.acceptedConstructors = new ObjectVector();
    }
    this.acceptedConstructors.add(
        new AcceptedConstructor(
            modifiers,
            simpleTypeName,
View Full Code Here

    if (isForbiddenType(packageName, simpleTypeName, enclosingTypeNames)) {
      return;
    }

    if(this.acceptedTypes == null) {
      this.acceptedTypes = new ObjectVector();
    }
    this.acceptedTypes.add(new AcceptedType(packageName, simpleTypeName, enclosingTypeNames, modifiers, accessibility));
  }
View Full Code Here

    CompletionOnFieldType field = (CompletionOnFieldType) astNode;
    CompletionOnSingleTypeReference type = (CompletionOnSingleTypeReference) field.type;
    this.completionToken = type.token;
    setSourceAndTokenRange(type.sourceStart, type.sourceEnd);

    findTypesAndPackages(this.completionToken, scope, true, true, new ObjectVector());
    if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
      findKeywordsForMember(this.completionToken, field.modifiers);
    }

    if (!field.isLocalVariable && field.modifiers == ClassFileConstants.AccDefault) {
      SourceTypeBinding enclosingType = scope.enclosingSourceType();
      if (!enclosingType.isAnnotationType()) {
        if (!this.requestor.isIgnored(CompletionProposal.METHOD_DECLARATION)) {
          findMethodDeclarations(
              this.completionToken,
              enclosingType,
              scope,
              new ObjectVector(),
              null,
              null,
              null,
              false);
        }
View Full Code Here

      if (!this.requestor.isIgnored(CompletionProposal.FIELD_REF)
          || !this.requestor.isIgnored(CompletionProposal.JAVADOC_FIELD_REF)) {
        findFields(this.completionToken,
          receiverType,
          scope,
          new ObjectVector(),
          new ObjectVector(),
          false, /*not only static */
          fieldRef,
          scope,
          false,
          true,
          null,
          null,
          null,
          false,
          null,
          -1,
          -1);
      }

      if (!this.requestor.isIgnored(CompletionProposal.METHOD_REF)
          || !this.requestor.isIgnored(CompletionProposal.JAVADOC_METHOD_REF)) {
        findMethods(
          this.completionToken,
          null,
          null,
          receiverType,
          scope,
          new ObjectVector(),
          false, /*not only static */
          false,
          fieldRef,
          scope,
          false,
 
View Full Code Here

    }
    setSourceAndTokenRange(rangeStart, astNode.sourceEnd, false);

    if (qualifiedBinding == null) {
      if (!this.requestor.isIgnored(CompletionProposal.METHOD_REF)) {
        findImplicitMessageSends(this.completionToken, argTypes, scope, messageSend, scope, new ObjectVector());
      }
    } else if (!this.requestor.isIgnored(CompletionProposal.METHOD_REF)) {
      findMethods(
        this.completionToken,
        null,
        argTypes,
        (ReferenceBinding) ((ReferenceBinding) qualifiedBinding).capture(scope, messageSend.receiver.sourceEnd),
        scope,
        new ObjectVector(),
        false,
        false/* prefix match */,
        messageSend,
        scope,
        false,
 
View Full Code Here

          (ReferenceBinding) qualifiedBinding,
          scope,
          scope.enclosingSourceType(),
          false,
          false,
          new ObjectVector(),
          null,
          null,
          null,
          false);
      }
View Full Code Here

    findTypesAndPackages(
        this.completionToken,
        scope,
        (this.assistNodeInJavadoc & CompletionOnJavadoc.BASE_TYPES) != 0,
        false,
        new ObjectVector());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.util.ObjectVector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.