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

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


      if (!this.requestor.isIgnored(CompletionProposal.ANNOTATION_ATTRIBUTE_REF)) {
        findAnnotationAttributes(this.completionToken, annotation.memberValuePairs(), annotationType);
      }
      if (this.assistNodeCanBeSingleMemberAnnotation) {
        if (this.expectedTypesPtr > -1 && this.expectedTypes[0].isAnnotationType()) {
          findTypesAndPackages(this.completionToken, scope, false, false, new ObjectVector());
        } else {
          if (this.expectedTypesPtr > -1) {
            this.assistNodeIsEnum = true;
            done : for (int i = 0; i <= this.expectedTypesPtr; i++) {
              if (!this.expectedTypes[i].isEnum()) {
                this.assistNodeIsEnum = false;
                break done;
              }
            }

          }
          if (scope instanceof BlockScope && !this.requestor.isIgnored(CompletionProposal.LOCAL_VARIABLE_REF)) {
            char[][] alreadyDefinedName = computeAlreadyDefinedName((BlockScope)scope, FakeInvocationSite);

            findUnresolvedReference(
                memberValuePair.sourceStart,
                memberValuePair.sourceEnd,
                (BlockScope)scope,
                alreadyDefinedName);
          }
          findVariablesAndMethods(
            this.completionToken,
            scope,
            FakeInvocationSite,
            scope,
            insideTypeAnnotation,
            true);
          // can be the start of a qualified type name
          findTypesAndPackages(this.completionToken, scope, false, false, new ObjectVector());
        }
      }
    }
  }
View Full Code Here


    CompletionOnMessageSend messageSend = (CompletionOnMessageSend) astNode;
    TypeBinding[] argTypes = computeTypes(messageSend.arguments);
    this.completionToken = messageSend.selector;
    if (qualifiedBinding == null) {
      if (!this.requestor.isIgnored(CompletionProposal.METHOD_REF)) {
        ObjectVector methodsFound = new ObjectVector();

        findImplicitMessageSends(this.completionToken, argTypes, scope, messageSend, scope, methodsFound);
       
        checkCancel();
       
        findLocalMethodsFromStaticImports(
            this.completionToken,
            scope,
            messageSend,
            scope,
            true,
            methodsFound,
            true);
      }
    } 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,
        true,
        messageSend,
        scope,
        false,
View Full Code Here

              this.completionToken,
              typeArgTypes,
              null,
              (ReferenceBinding)receiverType.capture(scope, messageSend.receiver.sourceEnd),
              scope,
              new ObjectVector(),
              onlyStatic,
              false,
              messageSend,
              scope,
              false,
View Full Code Here

            this.completionToken,
            referenceExpression.resolvedTypeArguments,
            null,
            (ReferenceBinding)receiverType.capture(scope, referenceExpression.sourceEnd),
            scope,
            new ObjectVector(),
            onlyStatic,
            false,
            referenceExpression,
            scope,
            false,
View Full Code Here

  private void completionOnMethodReturnType(ASTNode astNode, Scope scope) {
    CompletionOnMethodReturnType method = (CompletionOnMethodReturnType) astNode;
    SingleTypeReference type = (CompletionOnSingleTypeReference) method.returnType;
    this.completionToken = type.token;
    setSourceAndTokenRange(type.sourceStart, type.sourceEnd);
    findTypesAndPackages(this.completionToken, scope.parent, true, true, new ObjectVector());
    if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
      findKeywordsForMember(this.completionToken, method.modifiers, null);
    }

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

                ref.sourcePositions[0],
                scope);
          }
        }
      } else {
        ObjectVector typesFound = new ObjectVector();
        if (this.assistNodeIsException && astNodeParent instanceof TryStatement) {
          findExceptionFromTryStatement(
              this.completionToken,
              (ReferenceBinding)qualifiedBinding,
              scope.enclosingSourceType(),
View Full Code Here

      }
    } else if (qualifiedBinding instanceof VariableBinding) {
      setSourceAndTokenRange((int) (completionPosition >>> 32), (int) completionPosition);
      TypeBinding receiverType = ((VariableBinding) qualifiedBinding).type;
      if (receiverType != null && (receiverType.tagBits & TagBits.HasMissingType) == 0) {
        ObjectVector fieldsFound = new ObjectVector();
        ObjectVector methodsFound = new ObjectVector();

        findFieldsAndMethods(
            this.completionToken,
            receiverType.capture(scope, ref.sourceEnd),
            scope,
View Full Code Here

      }
    } else if (qualifiedBinding instanceof ReferenceBinding && !(qualifiedBinding instanceof TypeVariableBinding)) {
      if (!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
        setSourceAndTokenRange((int) (completionPosition >>> 32), (int) completionPosition);

        ObjectVector typesFound = new ObjectVector();

        if (this.assistNodeIsException && astNodeParent instanceof TryStatement) {
          findExceptionFromTryStatement(
              this.completionToken,
              (ReferenceBinding)qualifiedBinding,
View Full Code Here

      if (!this.requestor.isIgnored(CompletionProposal.FIELD_REF)) {
        this.assistNodeIsEnum = true;
        findEnumConstantsFromSwithStatement(this.completionToken, (SwitchStatement) astNodeParent);
      }
    } else if (this.expectedTypesPtr > -1 && this.expectedTypes[0].isAnnotationType()) {
      findTypesAndPackages(this.completionToken, scope, false, false, new ObjectVector());
    } else {
      if (this.expectedTypesPtr > -1) {
        this.assistNodeIsEnum = true;
        done : for (int i = 0; i <= this.expectedTypesPtr; i++) {
          if (!this.expectedTypes[i].isEnum()) {
            this.assistNodeIsEnum = false;
            break done;
          }
        }

      }
      if (scope instanceof BlockScope && !this.requestor.isIgnored(CompletionProposal.LOCAL_VARIABLE_REF)) {
        char[][] alreadyDefinedName = computeAlreadyDefinedName((BlockScope)scope, singleNameReference);

        findUnresolvedReference(
            singleNameReference.sourceStart,
            singleNameReference.sourceEnd,
            (BlockScope)scope,
            alreadyDefinedName);
      }
     
      checkCancel();
     
      findVariablesAndMethods(
        this.completionToken,
        scope,
        singleNameReference,
        scope,
        insideTypeAnnotation,
        singleNameReference.isInsideAnnotationAttribute);
     
      checkCancel();
     
      // can be the start of a qualified type name
      findTypesAndPackages(this.completionToken, scope, true, false, new ObjectVector());
      if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
        if (this.completionToken != null && this.completionToken.length != 0) {
          findKeywords(this.completionToken, singleNameReference.possibleKeywords, false, false);
        } else {
          findTrueOrFalseKeywords(singleNameReference.possibleKeywords);
View Full Code Here

              astNodeParent instanceof ParameterizedQualifiedTypeReference)) {
        this.setSourceAndTokenRange(astNode.sourceStart, astNode.sourceStart - 1, false);

        findParameterizedType((TypeReference)astNodeParent, scope);
      } else {
        ObjectVector typesFound = new ObjectVector();
        if (this.assistNodeIsException && astNodeParent instanceof TryStatement) {
          findExceptionFromTryStatement(
              this.completionToken,
              null,
              scope.enclosingSourceType(),
              (BlockScope)scope,
              typesFound);
        }
       
        checkCancel();
       
        findTypesAndPackages(this.completionToken, scope, this.assistNodeIsConstructor, false, typesFound);
      }
    } else if (!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
      findMemberTypes(
        this.completionToken,
        (ReferenceBinding) qualifiedBinding,
        scope,
        scope.enclosingSourceType(),
        false,
        false,
        false,
        false,
        !this.assistNodeIsConstructor,
        null,
        new ObjectVector(),
        null,
        null,
        null,
        false);
    }
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.