@Override public OpenL build(String category) throws OpenConfigurationException { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); ClassLoader userEnvitonmentContextClassLoader = getUserEnvironmentContext().getUserClassLoader(); try { Thread.currentThread().setContextClassLoader(userEnvitonmentContextClassLoader); OpenL.getInstance(extendsCategory, getUserEnvironmentContext()); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); } return super.build(category); }
protected Properties getProperties(String openl) { URL url = getResourceContext().findClassPathResource(openl.replace('.', '/') + '/' + openl + ".ant.properties"); if (url == null) { return null; } InputStream is = null; try { is = url.openStream(); Properties p = new Properties(); p.load(is); return p; } catch (IOException e) { throw RuntimeExceptionWrapper.wrap(e); } finally { try { if (is != null) { is.close(); } } catch (Throwable t) { Log.error("Error closing stream", t); } } }
public OpenL build(String openl) throws OpenConfigurationException { OpenL op = new OpenL(); op.setName(openl); try { NoAntOpenLTask naot = getNoAntOpenLTask(); naot.execute(getUserEnvironmentContext()); IOpenLConfiguration conf = NoAntOpenLTask.retrieveConfiguration(); op.setParser(new Parser(conf)); op.setBinder(new Binder(conf, conf, conf, conf, conf, op)); op.setVm(new SimpleVM()); op.setCompileContext(new DefaultCompileContext()); } catch (Exception ex) { throw RuntimeExceptionWrapper.wrap(ex); } return op; }
public OpenL build(String openl) throws OpenConfigurationException { OpenL op = new OpenL(); op.setName(openl); try { NoAntOpenLTask naot = getNoAntOpenLTask(); naot.execute(getUserEnvironmentContext()); IOpenLConfiguration conf = NoAntOpenLTask.retrieveConfiguration(); op.setParser(new Parser(conf)); op.setBinder(new Binder(conf, conf, conf, conf, conf, op)); op.setVm(new SimpleVM()); op.setCompileContext(new DefaultCompileContext()); } catch (Exception ex) { throw RuntimeExceptionWrapper.wrap(ex); } return op; }
@Override public OpenL build(String category) throws OpenConfigurationException { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); ClassLoader userEnvitonmentContextClassLoader = getUserEnvironmentContext().getUserClassLoader(); try { Thread.currentThread().setContextClassLoader(userEnvitonmentContextClassLoader); OpenL.getInstance(extendsCategory, getUserEnvironmentContext()); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); } return super.build(category); }
protected Properties getProperties(String openl) { URL url = getResourceContext().findClassPathResource(openl.replace('.', '/') + '/' + openl + ".ant.properties"); if (url == null) { return null; } InputStream is = null; try { is = url.openStream(); Properties p = new Properties(); p.load(is); return p; } catch (IOException e) { throw RuntimeExceptionWrapper.wrap(e); } finally { try { if (is != null) { is.close(); } } catch (Throwable t) { Log.error("Error closing stream", t); } } }
@Override public OpenL build(String category) throws OpenConfigurationException { OpenL.getInstance(OpenL.OPENL_J_NAME, getUserEnvironmentContext()); return super.build(category); }
@Override public OpenL build(String category) throws OpenConfigurationException { OpenL.getInstance(OpenL.OPENL_JAVA_NAME, getUserEnvironmentContext()); return super.build(category); }