Package org.im4java.script

Examples of org.im4java.script.ScriptGenerator


  /**
   * Generate a script.
   */

  public void createScript(PrintWriter pWriter, Operation pOp, Properties pProps) {
    ScriptGenerator sg = iScriptGenerator;
    if (sg == null) {
      sg = iDefaultScriptGenerator;
    }
   
    // add command as a property
    StringBuilder builder = new StringBuilder();
    for (String token:getCommand()) {
      builder.append(token).append(' ');
    }
    pProps.setProperty("im4java.cmd",builder.toString());

    // add search-paths as properties
    String globalPath=getGlobalSearchPath();
    if (globalPath==null) {
      globalPath="";
    }
    String localPath=getSearchPath();
    if (localPath==null) {
      localPath="";
    }
    pProps.setProperty("im4java.globalSearchPath",globalPath);
    pProps.setProperty("im4java.localSearchPath",localPath);

    sg.init(pWriter,pOp,pProps);
    sg.createScript();
  }
View Full Code Here


  /**
   * Generate a script.
   */

  public void createScript(PrintWriter pWriter, Operation pOp, Properties pProps) {
    ScriptGenerator sg = iScriptGenerator;
    if (sg == null) {
      sg = iDefaultScriptGenerator;
    }
   
    // add command as a property
    StringBuilder builder = new StringBuilder();
    for (String token:getCommand()) {
      builder.append(token).append(' ');
    }
    pProps.setProperty("im4java.cmd",builder.toString());

    // add search-paths as properties
    String globalPath=getGlobalSearchPath();
    if (globalPath==null) {
      globalPath="";
    }
    String localPath=getSearchPath();
    if (localPath==null) {
      localPath="";
    }
    pProps.setProperty("im4java.globalSearchPath",globalPath);
    pProps.setProperty("im4java.localSearchPath",localPath);

    sg.init(pWriter,pOp,pProps);
    sg.createScript();
  }
View Full Code Here

TOP

Related Classes of org.im4java.script.ScriptGenerator

Copyright © 2018 www.massapicom. 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.