private void doAutoImports(Environment env, Template t) throws IOException, TemplateException { Map<String, String> envAutoImports = env.getAutoImportsWithoutFallback(); Map<String, String> tAutoImports = t.getAutoImportsWithoutFallback(); boolean lazyAutoImports = env.getLazyAutoImports() != null ? env.getLazyAutoImports().booleanValue() : env.getLazyImports(); for (Map.Entry<String, String> autoImport : getAutoImportsWithoutFallback().entrySet()) { String nsVarName = autoImport.getKey(); if ((tAutoImports == null || !tAutoImports.containsKey(nsVarName)) && (envAutoImports == null || !envAutoImports.containsKey(nsVarName))) { env.importLib(autoImport.getValue(), nsVarName, lazyAutoImports); } } if (tAutoImports != null) { for (Map.Entry<String, String> autoImport : tAutoImports.entrySet()) { String nsVarName = autoImport.getKey(); if (envAutoImports == null || !envAutoImports.containsKey(nsVarName)) { env.importLib(autoImport.getValue(), nsVarName, lazyAutoImports); } } } if (envAutoImports != null) { for (Map.Entry<String, String> autoImport : envAutoImports.entrySet()) { String nsVarName = autoImport.getKey(); env.importLib(autoImport.getValue(), nsVarName, lazyAutoImports); } } }
private void doAutoImports(Environment env, Template t) throws IOException, TemplateException { Map<String, String> envAutoImports = env.getAutoImportsWithoutFallback(); Map<String, String> tAutoImports = t.getAutoImportsWithoutFallback(); boolean lazyAutoImports = env.getLazyAutoImports() != null ? env.getLazyAutoImports().booleanValue() : env.getLazyImports(); for (Map.Entry<String, String> autoImport : getAutoImportsWithoutFallback().entrySet()) { String nsVarName = autoImport.getKey(); if ((tAutoImports == null || !tAutoImports.containsKey(nsVarName)) && (envAutoImports == null || !envAutoImports.containsKey(nsVarName))) { env.importLib(autoImport.getValue(), nsVarName, lazyAutoImports); } } if (tAutoImports != null) { for (Map.Entry<String, String> autoImport : tAutoImports.entrySet()) { String nsVarName = autoImport.getKey(); if (envAutoImports == null || !envAutoImports.containsKey(nsVarName)) { env.importLib(autoImport.getValue(), nsVarName, lazyAutoImports); } } } if (envAutoImports != null) { for (Map.Entry<String, String> autoImport : envAutoImports.entrySet()) { String nsVarName = autoImport.getKey(); env.importLib(autoImport.getValue(), nsVarName, lazyAutoImports); } } }
private void doAutoImports(Environment env, Template t) throws IOException, TemplateException { Map<String, String> envAutoImports = env.getAutoImportsWithoutFallback(); Map<String, String> tAutoImports = t.getAutoImportsWithoutFallback(); boolean lazyAutoImports = env.getLazyAutoImports() != null ? env.getLazyAutoImports().booleanValue() : env.getLazyImports(); for (Map.Entry<String, String> autoImport : getAutoImportsWithoutFallback().entrySet()) { String nsVarName = autoImport.getKey(); if ((tAutoImports == null || !tAutoImports.containsKey(nsVarName)) && (envAutoImports == null || !envAutoImports.containsKey(nsVarName))) { env.importLib(autoImport.getValue(), nsVarName, lazyAutoImports); } } if (tAutoImports != null) { for (Map.Entry<String, String> autoImport : tAutoImports.entrySet()) { String nsVarName = autoImport.getKey(); if (envAutoImports == null || !envAutoImports.containsKey(nsVarName)) { env.importLib(autoImport.getValue(), nsVarName, lazyAutoImports); } } } if (envAutoImports != null) { for (Map.Entry<String, String> autoImport : envAutoImports.entrySet()) { String nsVarName = autoImport.getKey(); env.importLib(autoImport.getValue(), nsVarName, lazyAutoImports); } } }