Package org.eclipse.jdt.internal.core.util

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


    }

    // 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

        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

    }

    // 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

          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

    }

    // 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

          SourceTypeBinding sourceTypeBinding = ((SourceTypeBinding) declaringTypeBinding);
          ClassScope skope = sourceTypeBinding.scope;
          if (skope != null) {
            CompilationUnitDeclaration unit = skope.referenceCompilationUnit();
            if (unit != null) {
              AbstractMethodDeclaration amd = new ASTNodeFinder(unit).findMethod((IMethod) methodPattern.focus);
              if (amd != null && amd.binding != null && amd.binding.isValidBinding()) {
                this.bindings.put(methodPattern, amd.binding);
                return amd.binding;
              }
            }
View Full Code Here

          SourceTypeBinding sourceTypeBinding = ((SourceTypeBinding) declaringTypeBinding);
          ClassScope skope = sourceTypeBinding.scope;
          if (skope != null) {
            CompilationUnitDeclaration unit = skope.referenceCompilationUnit();
            if (unit != null) {
              AbstractMethodDeclaration amd = new ASTNodeFinder(unit).findMethod((IMethod) methodPattern.focus);
              if (amd != null && amd.binding != null && amd.binding.isValidBinding()) {
                this.bindings.put(methodPattern, amd.binding);
                return amd.binding;
              }
            }
View Full Code Here

        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, null);
        }
      }
    } catch (AbortCompilation e) {
View Full Code Here

          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

TOP

Related Classes of org.eclipse.jdt.internal.core.util.ASTNodeFinder

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.