}
String variable = type.getBuildVariable();
boolean multOfType = type.getMultipleOfType();
boolean primaryOutput = (type == tool.getPrimaryOutputType());
IOption option = tool.getOptionBySuperClassId(type.getOptionId());
IManagedOutputNameProvider nameProvider = type.getNameProvider();
String[] outputNames = type.getOutputNames();
// 1. If the tool is the build target and this is the primary
// output,
// use artifact name & extension
if (bIsTargetTool && primaryOutput) {
String outputName = outputPrefix + targetName;
if (targetExt.length() > 0) {
outputName += (DOT + targetExt);
}
myCommandOutputs.add(outputName);
typeEnumeratedOutputs.add(outputName);
// But this doesn't use any output macro...
} else
// 2. If an option is specified, use the value of the option
if (option != null) {
try {
List<String> outputs = new ArrayList<String>();
int optType = option.getValueType();
if (optType == IOption.STRING) {
outputs.add(outputPrefix + option.getStringValue());
} else if (optType == IOption.STRING_LIST || optType == IOption.LIBRARIES || optType == IOption.OBJECTS
|| optType == IOption.INCLUDE_FILES || optType == IOption.LIBRARY_PATHS || optType == IOption.LIBRARY_FILES
|| optType == IOption.MACRO_FILES) {
@SuppressWarnings("unchecked")
List<String> value = (List<String>) option.getValue();
outputs = value;
tool.filterValues(optType, outputs);
// Add outputPrefix to each if necessary
if (outputPrefix.length() > 0) {
for (int j = 0; j < outputs.size(); j++) {