Examples of ASTNodeFinder


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

          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

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

          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

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, null);
        }
      }
    } 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
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.