Example #1
0
  protected void addToArg(BuildIOType arg) {
    if (arg.isInput()) {
      fDepArgs.add(arg);
    } else {
      if (fProducerArg == null) {
        fProducerArg = arg;
      } else if (fProducerArg.getStep() == fInfo.getInputStep()) {
        BuildStep inStep = (BuildStep) fInfo.getInputStep();
        inStep.removeResource(fProducerArg, this, true);
        fProducerArg = arg;
      } else {
        String err = "ProducerArgument not null!!!\n"; // $NON-NLS-1$

        String rcName = DbgUtil.resourceName(this);
        String step1Name = DbgUtil.stepName(fProducerArg.getStep());
        String step2Name = DbgUtil.stepName(arg.getStep());
        String rcs[] = new String[] {rcName, step1Name, step2Name};

        String externalizedErr =
            BuildModelMessages.getFormattedString("BuildResource.0", rcs); // $NON-NLS-1$

        if (DbgUtil.DEBUG) {
          err =
              err
                  + externalizedErr
                  + "curent producer: "
                  + DbgUtil.dumpStep(fProducerArg.getStep())
                  + "\n producer attempt: "
                  + DbgUtil.dumpStep(arg.getStep()); // $NON-NLS-1$	//$NON-NLS-2$
        }

        throw new IllegalArgumentException(externalizedErr);
      }
    }
  }
Example #2
0
  protected List<Action> createTransientActions() {
    List<Action> r = super.createTransientActions();

    // Fix for ISSUE-1149
    for (MavenModule module : modules.values()) {
      module.updateTransientActions();
    }

    if (publishers
        != null) // this method can be loaded from within the onLoad method, where this might be
      // null
      for (BuildStep step : publishers) r.addAll(step.getProjectActions(this));

    if (buildWrappers != null)
      for (BuildWrapper step : buildWrappers) r.addAll(step.getProjectActions(this));

    return r;
  }