Пример #1
0
 @Override
 public void generate(
     Queue<Pair<Env<AttrContext>, JCClassDecl>> queue, Queue<JavaFileObject> results) {
   timer.startTask("Generate");
   super.generate(queue, results);
   timer.endTask();
 }
Пример #2
0
 public LanguageCompiler(Context context) {
   super(context);
   ceylonContext = getCeylonContextInstance(context);
   vfs = ceylonContext.getVfs();
   compilerDelegate = getCompilerDelegate(context);
   phasedUnits = getPhasedUnitsInstance(context);
   try {
     gen = CeylonTransformer.getInstance(context);
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
   modelLoader = CeylonModelLoader.instance(context);
   ceylonEnter = CeylonEnter.instance(context);
   options = Options.instance(context);
   isBootstrap = options.get(Option.BOOTSTRAPCEYLON) != null;
   timer = Timer.instance(context);
   sourceLanguage = SourceLanguage.instance(context);
   boolean isProgressPrinted =
       options.get(Option.CEYLONPROGRESS) != null && StatusPrinter.canPrint();
   if (isProgressPrinted) {
     sp = getStatusPrinterInstance(context);
     if (taskListener == null) {
       taskListener.add(new StatusPrinterTaskListener(sp));
     }
   }
 }
Пример #3
0
 @Override
 public List<JCCompilationUnit> parseFiles(Iterable<JavaFileObject> fileObjects) {
   timer.startTask("parse");
   /*
    * Stef: see javadoc for fixDefaultPackage() for why this is here.
    */
   modelLoader.fixDefaultPackage();
   List<JCCompilationUnit> trees = super.parseFiles(fileObjects);
   timer.startTask("loadCompiledModules");
   LinkedList<JCCompilationUnit> moduleTrees = new LinkedList<JCCompilationUnit>();
   // now load modules and associate their moduleless packages with the corresponding modules
   trees = loadCompiledModules(trees, moduleTrees);
   /*
    * Stef: see javadoc for cacheModulelessPackages() for why this is here.
    */
   modelLoader.cacheModulelessPackages();
   timer.endTask();
   return trees;
 }
Пример #4
0
 public LanguageCompiler(Context context) {
   super(context);
   ceylonContext = getCeylonContextInstance(context);
   vfs = ceylonContext.getVfs();
   compilerDelegate = getCompilerDelegate(context);
   phasedUnits = getPhasedUnitsInstance(context);
   try {
     gen = CeylonTransformer.getInstance(context);
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
   modelLoader = CeylonModelLoader.instance(context);
   ceylonEnter = CeylonEnter.instance(context);
   options = Options.instance(context);
   isBootstrap = options.get(OptionName.BOOTSTRAPCEYLON) != null;
   timer = Timer.instance(context);
 }