Examples of RuntimeInstance


Examples of org.apache.velocity.runtime.RuntimeInstance

     *
     */
    public TemplateProcessor()
    {
        final ExtendedProperties p = new ExtendedProperties();
        final RuntimeInstance velocity = new RuntimeInstance();
        p.setProperty(RuntimeConstants.SET_NULL_ALLOWED, "false");
        velocity.setConfiguration(p);
        this.velocity = velocity;
    }
View Full Code Here

Examples of org.apache.velocity.runtime.RuntimeInstance

            // Disable separate Velocity logging.
            p.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
                NullLogChute.class.getName());
   
            final RuntimeInstance velocity = new RuntimeInstance();
            velocity.setConfiguration(p);
            return velocity;
        }
        catch (Exception e)
        {
            throw new RuntimeException("Velocity initialization failed.", e);
View Full Code Here

Examples of org.apache.velocity.runtime.RuntimeInstance

    if (uris != null) {
      for (int i = 0; i < uris.length && !reporter.isCancelled(); i++) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uris[i]));
        try {
          try {
            RuntimeInstance runtime = new RuntimeInstance();
            runtime.init();
            runtime.parse(new InputStreamReader(file.getContents(), file.getCharset()), file.getName());
           
          } catch(ParseException ex){
            Matcher matcher = PATTERN.matcher(ex.getMessage());
            if(matcher.find()){
              ValidationDocument doc = new ValidationDocument(file);
View Full Code Here

Examples of org.apache.velocity.runtime.RuntimeInstance

        }
        if (!webAppPath.endsWith("/") && !webAppPath.endsWith("\\"))
            webAppPath = webAppPath + File.separator;
        log.info("Detect web application path: " + webAppPath);
        log.info("init VelocityTemplateFactory...");
        rtInstance = new RuntimeInstance();
        // read property file:
        Properties props = readProperties(webAppPath + "/WEB-INF/velocity.properties");
        checkProperty(props);
        Set<?> keys = props.keySet();
        for(Object key : keys) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.