Ejemplo n.º 1
0
  public void execute() throws BuildException {
    EclipseUtil.clearProjectProblems();

    checkPreconditions();

    Calendar cal = Calendar.getInstance();
    long starttime = cal.getTimeInMillis();

    if (_args.get("file-specs") == null) {
      throw new BuildException(TranslationUtil.getTranslation("general.specify_file_specs"));
    }

    ArrayList<String> output = new ArrayList<String>();
    for (String o : _options.keySet()) {
      output = buildCommand(o, output);
    }

    FcshWrapper.compile("mxmlc", output, this, _sdk);

    while (_exit != true) {
      cal = Calendar.getInstance();
      if (cal.getTimeInMillis() - starttime > _max_execution_time) {
        throw new BuildException(TranslationUtil.getTranslation("general.max_execution_time"));
      }
    }

    onlyFirstError(onlyFirstError, lasterror);
    checkError(_error, _errormessage);
  }
  public String toString() {

    if (_lang == null) {
      task.callException(
          TranslationUtil.getTranslation("param.specify_a_value_for") + " " + option);
    }

    if (_range == null) {
      task.callException(
          TranslationUtil.getTranslation("param.specify_a_value_for") + " " + option);
    }

    if (_lang != null && _range != null) {
      return _lang + " " + _range;
    }

    return "";
  }