예제 #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);
      }
    }
  }
예제 #2
0
 public void setRemoved(boolean removed) {
   if (DbgUtil.DEBUG) {
     if (removed)
       DbgUtil.trace("REMOVED state: resource " + DbgUtil.resourceName(this)); // $NON-NLS-1$
   }
   fIsRemoved = removed;
   if (fIsRemoved) fNeedsRebuild = false;
 }
예제 #3
0
  BuildIOType[][] remove() {
    BuildIOType types[][] = clear();

    if (DbgUtil.DEBUG)
      DbgUtil.trace(
          "resource " + DbgUtil.resourceName(this) + " removed"); // $NON-NLS-1$	//$NON-NLS-2$

    fInfo.resourceRemoved(this);
    fInfo = null;

    return types;
  }
예제 #4
0
  protected BuildResource(BuildDescription info, IPath fullWorkspacePath, URI locationURI) {

    if (locationURI == null) throw new IllegalArgumentException(); // must point to somewhere!

    fLocationURI = locationURI;

    fFullWorkspacePath = fullWorkspacePath;
    fInfo = info;

    fIsProjectRc = (fullWorkspacePath != null);

    info.resourceCreated(this);

    if (DbgUtil.DEBUG)
      DbgUtil.trace("resource " + fullWorkspacePath + " created"); // $NON-NLS-1$	//$NON-NLS-2$
  }