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); } } }
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; }
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$ }
protected BuildResource(BuildDescription info, IResource rc) { this(info, info.calcResourceLocation(rc), rc.getLocationURI()); }