collectorNode.removeAllChildren();
// Add node for the arguments.
List<Gem.PartInput> reflectedInputs = collectorGem.getReflectedInputs();
for (final Gem.PartInput reflectedInput : reflectedInputs) {
ArgumentNode reflectedInputNode = getArgumentNode(reflectedInput);
collectorNode.add(reflectedInputNode);
}
if (displayUnusedArguments) {
// Get the unused arguments.
Set<PartInput> unusedArgumentSet = new HashSet<PartInput>(collectorGem.getTargetArguments());
unusedArgumentSet.removeAll(reflectedInputs);
// Sort them.
List<PartInput> unusedArgumentList = new ArrayList<PartInput>(unusedArgumentSet);
Collections.sort(unusedArgumentList, argumentComparatorByName);
// Add the nodes.
for (final PartInput unusedArgument : unusedArgumentList) {
ArgumentNode unusedInputArgumentNode = getArgumentNode(unusedArgument);
collectorNode.add(unusedInputArgumentNode);
}
}
// Call recursively on targeting collectors.