@Override protected HostedModeOptions createOptions() { HostedModeOptions options = super.createOptions(); options.setSuperDevMode(false); options.setIncrementalCompileEnabled(false); return options; }
@Override protected ModuleDef loadModule(TreeLogger logger, String moduleName, boolean refresh) throws UnableToCompleteException { // Never refresh modules in JUnit. return super.loadModule(logger, moduleName, false); }
private void rebindCachePut(Rule rule, String typeName, CachedGeneratorResult result) { if (rebindCache != null) { rebindCache.put(rule, typeName, result); } } }
public void onModuleReady(ModuleSpace readySpace) throws UnableToCompleteException { this.space = readySpace; Event moduleSpaceHostReadyEvent = SpeedTracerLogger.start(DevModeEventType.MODULE_SPACE_HOST_READY); try { // Establish an environment for JavaScript property providers to run. // ModuleSpacePropertyOracle propOracle = new ModuleSpacePropertyOracle( module.getProperties(), module.getActiveLinkerNames(), readySpace); // Set up the rebind oracle for the module. // It has to wait until now because we need to inject javascript. // Deque<Rule> rules = module.getRules(); PrecompileTaskOptionsImpl options = new PrecompileTaskOptionsImpl(); options.setGenDir(genDir); CompilerContext compilerContext = new CompilerContext.Builder().module(module).options( options).build(); StandardGeneratorContext genCtx = new StandardGeneratorContext(compilerContext, compilationState, new ArtifactSet(), false); // Only enable generator result caching if we have a valid rebindCache genCtx.setGeneratorResultCachingEnabled(rebindCache != null); rebindOracle = new StandardRebindOracle2(propOracle, rules, genCtx); rebindOracle.setRebindCache(rebindCache); } finally { moduleSpaceHostReadyEvent.end(); } }
private static MinimalRebuildCacheManager createMinimalRebuildCacheManager( PrintWriterTreeLogger logger, Options options,File baseCacheDir) { return new MinimalRebuildCacheManager( logger, baseCacheDir, ImmutableMap.of( "style", options.getOutput().name(), "closureFormattedOutput", String.valueOf(options.isClosureFormattedOutput()), "generateJsInteropExports", String.valueOf(options.shouldGenerateJsInteropExports()), "exportFilters", options.getJsInteropExportFilter().toString(), "methodDisplayMode", options.getMethodNameDisplayMode().name())); }
Recompiler(OutboxDir outboxDir, LauncherDir launcherDir, String inputModuleName, Options options, UnitCache unitCache, MinimalRebuildCacheManager minimalRebuildCacheManager) { this.outboxDir = outboxDir; this.launcherDir = launcherDir; this.inputModuleName = inputModuleName; this.options = options; this.unitCache = unitCache; this.minimalRebuildCacheManager = minimalRebuildCacheManager; this.serverPrefix = options.getPreferredHost() + ":" + options.getPort(); compilerContext = compilerContextBuilder.build(); }
private DevMode.HostedModeOptions createOptions() { DevMode.HostedModeOptions options = GwtReflectionUtils.instantiateClass("com.google.gwt.dev.DevMode$HostedModeOptionsImpl"); options.setSuperDevMode(false); options.setIncrementalCompileEnabled(false); return options; } }
@Override public Void call() throws UnableToCompleteException { long beforeMs = System.nanoTime() / 1000000L; minimalRebuildCacheManager.deleteCaches(); UnitCacheSingleton.clearCache(); outboxTable.forceNextRecompileAll(); long afterMs = System.nanoTime() / 1000000L; logger.log(TreeLogger.INFO, String.format("Cleaned in %sms.", (afterMs - beforeMs))); return null; } }
@Override protected void ensureCodeServerListener() { if (developmentMode) { super.ensureCodeServerListener(); listener.setIgnoreRemoteDeath(true); } }
@Override public Void call() throws UnableToCompleteException { long beforeMs = System.nanoTime() / 1000000L; minimalRebuildCacheManager.deleteCaches(); UnitCacheSingleton.clearCache(); long afterMs = System.nanoTime() / 1000000L; logger.log(TreeLogger.INFO, String.format("Cleaned in %sms.", (afterMs - beforeMs))); return null; } }
/** * Returns the current version of GWT ({@link About#getGwtVersionNum()}). */ @Override public String getVersion() { return About.getGwtVersionNum(); }
private CachedGeneratorResult rebindCacheGet(Rule rule, String typeName) { if (rebindCache != null) { return rebindCache.get(rule, typeName); } return null; }
Recompiler(OutboxDir outboxDir, LauncherDir launcherDir, String inputModuleName, Options options, UnitCache unitCache, MinimalRebuildCacheManager minimalRebuildCacheManager) { this.outboxDir = outboxDir; this.launcherDir = launcherDir; this.inputModuleName = inputModuleName; this.options = options; this.unitCache = unitCache; this.minimalRebuildCacheManager = minimalRebuildCacheManager; this.serverPrefix = options.getPreferredHost() + ":" + options.getPort(); compilerContext = compilerContextBuilder.build(); }
@Override protected HostedModeOptions createOptions() { HostedModeOptions options = super.createOptions(); options.setSuperDevMode(false); options.setIncrementalCompileEnabled(false); return options; }
private DevMode.HostedModeOptions createOptions() { DevMode.HostedModeOptions options = GwtReflectionUtils.instantiateClass("com.google.gwt.dev.DevMode$HostedModeOptionsImpl"); options.setSuperDevMode(false); options.setIncrementalCompileEnabled(false); return options; } }
@Override protected void ensureCodeServerListener() { if (developmentMode) { super.ensureCodeServerListener(); listener.setIgnoreRemoteDeath(true); } }
@Override protected ModuleDef loadModule(TreeLogger logger, String moduleName, boolean refresh) throws UnableToCompleteException { // Never refresh modules in JUnit. return super.loadModule(logger, moduleName, false); }
/** * Returns the current version of GWT ({@link About#getGwtVersionNum()}). */ @Override public String getVersion() { return About.getGwtVersionNum(); }
private void rebindCachePut(Rule rule, String typeName, CachedGeneratorResult result) { if (rebindCache != null) { rebindCache.put(rule, typeName, result); } } }
private CachedGeneratorResult rebindCacheGet(Rule rule, String typeName) { if (rebindCache != null) { return rebindCache.get(rule, typeName); } return null; }