public UpdateActionCustom(final Workspace workspace,final File file){
  this.updater=workspace.getUpdater();
  StringBuilder scriptText=new StringBuilder();
  String newLine=System.getProperty("line.separator");
  Scanner scanner=null;
  try {
    scanner=new Scanner(new FileInputStream(file));
    while (scanner.hasNextLine()) {
      scriptText.append(scanner.nextLine() + newLine);
    }
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
 finally {
    scanner.close();
  }
  this.scriptString=scriptText.toString();
  init();
}

public UpdateActionCustom ( final Workspace workspace , final File file ) { this . updater = workspace . getUpdater ( ) ; StringBuilder scriptText = new StringBuilder ( ) ; String newLine = System . getProperty ( "line.separator" ) ; Scanner scanner = null ; try { scanner = new Scanner ( new FileInputStream ( file ) ) ; while ( scanner . hasNextLine ( ) ) { scriptText . append ( scanner . nextLine ( ) + newLine ) ; } } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } finally { scanner . close ( ) ; } this . scriptString = scriptText . toString ( ) ; init ( ) ; }
create a new custom update action from a file containing the custom script .
