Examples of ASTNodeFinder


Examples of dtool.ast.ASTNodeFinder

    protected Reference pickedRef;
    public Collection<INamedElement> resolvedDefUnits;
    public boolean invalidPickRef = false;
   
    public void pickLocation(Module module, int offset) {
      ASTNodeFinder nodeFinder = new ASTNodeFinder(module, offset, true);
     
      if(nodeFinder.matchOnLeft instanceof Reference) {
        this.pickedNode = nodeFinder.matchOnLeft;
        this.pickedRef = (Reference) pickedNode;
      } else if(nodeFinder.match instanceof Reference) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.core.util.ASTNodeFinder

        if(DEBUG) {
          System.out.println("SELECTION - Diet AST :"); //$NON-NLS-1$
          System.out.println(parsedUnit.toString());
        }
        // find the type declaration that corresponds to the original source type
        TypeDeclaration typeDecl = new ASTNodeFinder(parsedUnit).findType(typeHandle);

        if (typeDecl != null) {

          // add fake field with the type we're looking for
          // note: since we didn't ask for fields above, there is no field defined yet
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.core.util.ASTNodeFinder

        char[] fullyQualifiedName = focus.getFullyQualifiedName().toCharArray();
        setFocusType(CharOperation.splitOn('.', fullyQualifiedName));
      } else {
        // anonymous or local type
        if (parsedUnit != null) {
          TypeDeclaration typeDecl = new ASTNodeFinder(parsedUnit).findType(focus);
          if (typeDecl != null) {
            this.focusType = typeDecl.binding;
          }
        }
      }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.core.util.ASTNodeFinder

        ICompilationUnit unit = this.type.getCompilationUnit();
        SourceType sourceType = (SourceType) this.type;
        boolean isTopLevelOrMember = sourceType.getOuterMostLocalContext() == null;
        CompilationUnitDeclaration parsedUnit = buildBindings(unit, isTopLevelOrMember);
        if (parsedUnit != null) {
          TypeDeclaration typeDecl = new ASTNodeFinder(parsedUnit).findType(this.type);
          if (typeDecl != null && typeDecl.binding != null)
            collectSuperTypeNames(typeDecl.binding);
        }
      }
    } catch (AbortCompilation e) {
View Full Code Here

Examples of org.eclipse.jdt.internal.core.util.ASTNodeFinder

          if(DEBUG) {
            System.out.println("SELECTION - Diet AST :"); //$NON-NLS-1$
            System.out.println(parsedUnit.toString());
          }
          // find the type declaration that corresponds to the original source type
          typeDeclaration = new ASTNodeFinder(parsedUnit).findType(context);
        }
      } else { // binary type
        ClassFile classFile = (ClassFile) context.getClassFile();
        ClassFileReader reader = (ClassFileReader) classFile.getBinaryTypeInfo((IFile) classFile.resource(), false/*don't fully initialize so as to keep constant pool (used below)*/);
        CompilationResult result = new CompilationResult(reader.getFileName(), 1, 1, this.compilerOptions.maxProblemsPerUnit);
View Full Code Here

Examples of org.eclipse.jdt.internal.core.util.ASTNodeFinder

    }

    // remember type declaration of focus if local/anonymous early (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=210498)
    TypeDeclaration focusLocalType = null;
    if (focus != null && focusBinaryBinding == null && focusUnit != null && ((Member)focus).getOuterMostLocalContext() != null) {
      focusLocalType = new ASTNodeFinder(focusUnit).findType(focus);
    }


    for (int i = 0; i <= this.typeIndex; i++) {
      IGenericType suppliedType = this.typeModels[i];
View Full Code Here

Examples of org.eclipse.jdt.internal.core.util.ASTNodeFinder

        ICompilationUnit unit = this.type.getCompilationUnit();
        SourceType sourceType = (SourceType) this.type;
        boolean isTopLevelOrMember = sourceType.getOuterMostLocalContext() == null;
        CompilationUnitDeclaration parsedUnit = buildBindings(unit, isTopLevelOrMember);
        if (parsedUnit != null) {
          TypeDeclaration typeDecl = new ASTNodeFinder(parsedUnit).findType(this.type);
          if (typeDecl != null && typeDecl.binding != null)
            collectSuperTypeNames(typeDecl.binding);
        }
      }
    } catch (AbortCompilation e) {
View Full Code Here

Examples of org.eclipse.jdt.internal.core.util.ASTNodeFinder

    }

    // remember type declaration of focus if local/anonymous early (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=210498)
    TypeDeclaration focusLocalType = null;
    if (focus != null && focusBinaryBinding == null && focusUnit != null && ((Member)focus).getOuterMostLocalContext() != null) {
      focusLocalType = new ASTNodeFinder(focusUnit).findType(focus);
    }


    for (int i = 0; i <= this.typeIndex; i++) {
      IGenericType suppliedType = this.typeModels[i];
View Full Code Here

Examples of org.eclipse.jdt.internal.core.util.ASTNodeFinder

          if(DEBUG) {
            System.out.println("SELECTION - Diet AST :"); //$NON-NLS-1$
            System.out.println(parsedUnit.toString());
          }
          // find the type declaration that corresponds to the original source type
          typeDeclaration = new ASTNodeFinder(parsedUnit).findType(context);
        }
      } else { // binary type
        ClassFile classFile = (ClassFile) context.getClassFile();
        ClassFileReader reader = (ClassFileReader) classFile.getBinaryTypeInfo((IFile) classFile.resource(), false/*don't fully initialize so as to keep constant pool (used below)*/);
        CompilationResult result = new CompilationResult(reader.getFileName(), 1, 1, this.compilerOptions.maxProblemsPerUnit);
View Full Code Here

Examples of org.eclipse.jdt.internal.core.util.ASTNodeFinder

    }

    // remember type declaration of focus if local/anonymous early (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=210498)
    TypeDeclaration focusLocalType = null;
    if (focus != null && focusBinaryBinding == null && focusUnit != null && ((Member)focus).getOuterMostLocalContext() != null) {
      focusLocalType = new ASTNodeFinder(focusUnit).findType(focus);
    }


    for (int i = 0; i <= this.typeIndex; i++) {
      IGenericType suppliedType = this.typeModels[i];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.