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)); } } }
/** Get the JavaCompiler instance for this context. */ public static JavaCompiler instance(Context context) { Options options = Options.instance(context); options.put("-Xprefer", "source"); // make sure it's registered Log log = CeylonLog.instance(context); CeylonEnter.instance(context); CeylonClassWriter.instance(context); JavaCompiler instance = context.get(compilerKey); if (instance == null) instance = new LanguageCompiler(context); return instance; }
public LanguageCompiler(Context context) { super(context); ceylonContext = getCeylonContextInstance(context); vfs = ceylonContext.getVfs(); 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); }
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); }
@Override public void prepareForTypeChecking(List<JCCompilationUnit> trees) { CeylonEnter.instance(context).prepareForTypeChecking(trees); }