Package com.google.gwt.dev.jdt

Examples of com.google.gwt.dev.jdt.TypeOracleBuilder


          subBranch = branch.branch(TreeLogger.DEBUG,
              "Generated source files...", null);
        }

        assert (cacheManager.getTypeOracle() == typeOracle);
        TypeOracleBuilder builder = new TypeOracleBuilder(cacheManager);
        for (Iterator iter = committedGeneratedCups.iterator(); iter.hasNext();) {
          GeneratedCompilationUnitProvider gcup = (GeneratedCompilationUnitProvider) iter.next();
          String typeName = gcup.getTypeName();
          String genTypeName = gcup.getPackageName() + "." + typeName;
          genTypeNames.add(genTypeName);
          CompilationUnitProvider cup = writeSource(logger, gcup, typeName);
          builder.addCompilationUnit(cup);
          cacheManager.addGeneratedCup(cup);
         
          if (subBranch != null) {
            subBranch.log(TreeLogger.DEBUG, cup.getLocation(), null);
          }
        }
       
        builder.build(branch);
      }

      // Return the generated types.
      JClassType[] genTypes = new JClassType[genTypeNames.size()];
      int next = 0;
View Full Code Here


      //
      try {
        String msg = "Analyzing source in module '" + name + "'";
        TreeLogger branch = logger.branch(TreeLogger.TRACE, msg, null);
        long before = System.currentTimeMillis();
        TypeOracleBuilder builder = new TypeOracleBuilder(getCacheManager());
        CompilationUnitProvider[] currentCups = getCompilationUnits();
        Arrays.sort(currentCups, CompilationUnitProvider.LOCATION_COMPARATOR);

        TreeLogger subBranch = null;
        if (branch.isLoggable(TreeLogger.DEBUG)) {
          subBranch = branch.branch(TreeLogger.DEBUG,
              "Adding compilation units...", null);
        }

        for (int i = 0; i < currentCups.length; i++) {
          CompilationUnitProvider cup = currentCups[i];
          if (subBranch != null) {
            subBranch.log(TreeLogger.DEBUG, cup.getLocation(), null);
          }
          builder.addCompilationUnit(currentCups[i]);
        }
        lazyTypeOracle = builder.build(branch);
        long after = System.currentTimeMillis();
        branch.log(TreeLogger.TRACE, "Finished in " + (after - before) + " ms",
            null);
      } catch (UnableToCompleteException e) {
        logger.log(TreeLogger.ERROR, "Failed to complete analysis", null);
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jdt.TypeOracleBuilder

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.