@Override public ModuleDef maybeCompileModule(String moduleName, String syntheticModuleName, Strategy strategy, BatchingStrategy batchingStrategy, TreeLogger treeLogger) throws UnableToCompleteException { // Initialize the map of modules. if (preCompiledModuleDefs == null) { this.batchingStrategy = batchingStrategy; this.treeLogger = treeLogger; preCompiledModuleDefs = new HashMap<String, ModuleDef>(); String[] allModuleNames = GWTTestCase.getAllTestModuleNames(); for (String curModuleName : allModuleNames) { modulesToCompile.add(curModuleName); } } // Compile the requested module if needed. ModuleDef moduleDef = preCompiledModuleDefs.get(syntheticModuleName); if (moduleDef == null) { moduleDef = maybeCompileModuleImpl(moduleName, syntheticModuleName, strategy, batchingStrategy, treeLogger); } return moduleDef; }
@Override public ModuleDef maybeCompileModule(String moduleName, String syntheticModuleName, Strategy strategy, BatchingStrategy batchingStrategy, TreeLogger treeLogger) throws UnableToCompleteException { // Initialize the map of modules. if (preCompiledModuleDefs == null) { this.batchingStrategy = batchingStrategy; this.treeLogger = treeLogger; preCompiledModuleDefs = new HashMap<String, ModuleDef>(); String[] allModuleNames = GWTTestCase.getAllTestModuleNames(); for (String curModuleName : allModuleNames) { modulesToCompile.add(curModuleName); } } // Compile the requested module if needed. ModuleDef moduleDef = preCompiledModuleDefs.get(syntheticModuleName); if (moduleDef == null) { moduleDef = maybeCompileModuleImpl(moduleName, syntheticModuleName, strategy, batchingStrategy, treeLogger); } return moduleDef; }
/** * Precompile all modules if needed. */ private void maybePrecompileModules(BatchingStrategy batchingStrategy, TreeLogger treeLogger) throws UnableToCompleteException { if (preCompiledModuleDefs == null) { preCompiledModuleDefs = new HashMap<String, ModuleDef>(); for (String moduleName : GWTTestCase.getAllTestModuleNames()) { TestModuleInfo moduleInfo = GWTTestCase.getTestsForModule(moduleName); String syntheticModuleName = moduleInfo.getSyntheticModuleName(); if (syntheticModuleName != null) { ModuleDef moduleDef = maybeCompileModuleImpl( moduleInfo.getModuleName(), syntheticModuleName, moduleInfo.getStrategy(), batchingStrategy, treeLogger); preCompiledModuleDefs.put(syntheticModuleName, moduleDef); } } } } }
/** * Precompile all modules if needed. */ private void maybePrecompileModules(BatchingStrategy batchingStrategy, TreeLogger treeLogger) throws UnableToCompleteException { if (preCompiledModuleDefs == null) { preCompiledModuleDefs = new HashMap<String, ModuleDef>(); for (String moduleName : GWTTestCase.getAllTestModuleNames()) { TestModuleInfo moduleInfo = GWTTestCase.getTestsForModule(moduleName); String syntheticModuleName = moduleInfo.getSyntheticModuleName(); if (syntheticModuleName != null) { ModuleDef moduleDef = maybeCompileModuleImpl( moduleInfo.getModuleName(), syntheticModuleName, moduleInfo.getStrategy(), batchingStrategy, treeLogger); preCompiledModuleDefs.put(syntheticModuleName, moduleDef); } } } } }