Examples of parseCompilationUnit()


Examples of org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit()

      boolean doFullParse = hasToRetrieveSourceRangesForLocalClass(fullName);
      parser = new SourceElementParser(this, factory, new CompilerOptions(this.options), doFullParse, true/*optimize string literals*/);
      parser.javadocParser.checkDocComment = false; // disable javadoc parsing
      IJavaElement javaElement = this.binaryType.getCompilationUnit();
      if (javaElement == null) javaElement = this.binaryType.getParent();
      parser.parseCompilationUnit(
        new BasicCompilationUnit(contents, null, this.binaryType.sourceFileName(info), javaElement),
        doFullParse,
        null/*no progress*/);
      if (elementToFind != null) {
        ISourceRange range = getNameRange(elementToFind);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit()

      // ignore
    }
    if (source == null || name == null) return; // could not retrieve document info (e.g. resource was discarded)
    CompilationUnit compilationUnit = new CompilationUnit(source, name);
    try {
      parser.parseCompilationUnit(compilationUnit, true/*full parse*/, null/*no progress*/);
    } catch (Exception e) {
      if (JobManager.VERBOSE) {
        e.printStackTrace();
      }
    }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit()

      } else {
        // collect problems
        compilationUnitDeclaration = CompilationUnitProblemFinder.process(source, parser, this.owner, problems, createAST, reconcileFlags, pm);
      }
    } else {
      compilationUnitDeclaration = parser.parseCompilationUnit(source, true /*full parse to find local elements*/, pm);
    }

    if (createAST) {
      int astLevel = ((ASTHolderCUInfo) info).astLevel;
      org.eclipse.jdt.core.dom.CompilationUnit cu = AST.convertCompilationUnit(astLevel, compilationUnitDeclaration, options, computeProblems, source, reconcileFlags, pm);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit()

      File sourceFile = findSourceFile(klass);
      sourceContents = read(sourceFile);
      CompilationUnit unit = new CompilationUnit(sourceContents,
          sourceFile.getName(), null);

      parser.parseCompilationUnit(unit, true);
    }

    /**
     * Returns the source code for the method of the given name.
     *
 
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit()

      } else {
        // collect problems
        compilationUnitDeclaration = CompilationUnitProblemFinder.process(source, parser, this.owner, problems, createAST, reconcileFlags, pm);
      }
    } else {
      compilationUnitDeclaration = parser.parseCompilationUnit(source, true /*full parse to find local elements*/, pm);
    }

    if (createAST) {
      int astLevel = ((ASTHolderCUInfo) info).astLevel;
      org.eclipse.jdt.core.dom.CompilationUnit cu = AST.convertCompilationUnit(astLevel, compilationUnitDeclaration, options, computeProblems, source, reconcileFlags, pm);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit()

      } else {
        // collect problems
        compilationUnitDeclaration = CompilationUnitProblemFinder.process(source, parser, this.owner, problems, createAST, reconcileFlags, pm);
      }
    } else {
      compilationUnitDeclaration = parser.parseCompilationUnit(source, true /*full parse to find local elements*/, pm);
    }

    if (createAST) {
      int astLevel = ((ASTHolderCUInfo) info).astLevel;
      org.eclipse.jdt.core.dom.CompilationUnit cu = AST.convertCompilationUnit(astLevel, compilationUnitDeclaration, options, computeProblems, source, reconcileFlags, pm);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit()

      boolean doFullParse = hasToRetrieveSourceRangesForLocalClass(fullName);
      parser = new SourceElementParser(this, factory, new CompilerOptions(this.options), doFullParse, true/*optimize string literals*/);
      parser.javadocParser.checkDocComment = false; // disable javadoc parsing
      IJavaElement javaElement = this.binaryType.getCompilationUnit();
      if (javaElement == null) javaElement = this.binaryType.getParent();
      parser.parseCompilationUnit(
        new BasicCompilationUnit(contents, null, this.binaryType.sourceFileName(info), javaElement),
        doFullParse,
        null/*no progress*/);
      if (elementToFind != null) {
        ISourceRange range = getNameRange(elementToFind);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit()

      // ignore
    }
    if (source == null || name == null) return; // could not retrieve document info (e.g. resource was discarded)
    CompilationUnit compilationUnit = new CompilationUnit(source, name);
    try {
      parser.parseCompilationUnit(compilationUnit, true/*full parse*/, null/*no progress*/);
    } catch (Exception e) {
      if (JobManager.VERBOSE) {
        e.printStackTrace();
      }
    }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit()

      // ignore
    }
    if (source == null || name == null) return; // could not retrieve document info (e.g. resource was discarded)
    this.compilationUnit = new CompilationUnit(source, name);
    try {
      if (parser.parseCompilationUnit(this.compilationUnit, true, null).hasFunctionalTypes())
        this.document.requireIndexingResolvedDocument();
    } catch (Exception e) {
      if (JobManager.VERBOSE) {
        e.printStackTrace();
      }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit()

      boolean doFullParse = hasToRetrieveSourceRangesForLocalClass(fullName);
      parser = new SourceElementParser(this, factory, new CompilerOptions(this.options), doFullParse, true/*optimize string literals*/);
      parser.javadocParser.checkDocComment = false; // disable javadoc parsing
      IJavaElement javaElement = this.binaryType.getCompilationUnit();
      if (javaElement == null) javaElement = this.binaryType.getParent();
      parser.parseCompilationUnit(
        new BasicCompilationUnit(contents, null, this.binaryType.sourceFileName(info), javaElement),
        doFullParse,
        null/*no progress*/);
      if (elementToFind != null) {
        ISourceRange range = getNameRange(elementToFind);
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.