}
public void saveSelectedTestSuites(CampaignWriter writer, JTreeNode parentNode, String testbedName) {
// navigate through children
Object[] children = parentNode.getChildren();
for (int i=0; i<children.length; i++) {
JTreeNode childFileNode = (JTreeNode)children[i];
TristateCheckBox.State state = this.getNodeState(childFileNode, testbedName);
if (state == TristateCheckBox.SELECTED) {
if (childFileNode instanceof TestDataNode) {
for (int childIndex=0; childIndex < children.length; childIndex++) {
TestDataNode dataNode = (TestDataNode)children[childIndex];
if (getNodeState(dataNode, testbedName) == TristateCheckBox.SELECTED) {
writer.addCampaign(testbedName, parentNode.getFile().getPath().replace("\\", "/"), dataNode.getRowIndex());
}
}
// quit the loop because testdata already added and so children are testdata
break;
}
else
{
writer.addCampaign(testbedName, childFileNode.getFile().getPath().replace("\\", "/"));
}
}
if (state == TristateCheckBox.DONT_CARE) {
// check its children
//if children are testdata add specific node
Object[] childChildren = childFileNode.getChildren();
if (childChildren.length>0) {
// check if it's datarow
JTreeNode childDataNode = (JTreeNode)childChildren[0];
if (childDataNode instanceof TestDataNode) {
for (int childIndex=0; childIndex < childChildren.length; childIndex++) {
TestDataNode dataNode = (TestDataNode)childChildren[childIndex];
if (getNodeState(dataNode, testbedName) == TristateCheckBox.SELECTED)
{