import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.argeo.eclipse.ui.TreeObject;
import org.argeo.eclipse.ui.TreeParent;
import org.argeo.slc.core.structure.tree.TreeSPath;
import org.argeo.slc.core.test.tree.PartSubList;
public Object[] getChildren(Object parent) {
if (parent instanceof TreeTestResult) {
- log.error("We should not reach this point.");
+ if (log.isErrorEnabled())
+ log.error("Trying to get children for parent object of type TreeTestResult. "
+ + "We should not reach this point.");
return null;
}
}
public Object getParent(Object node) {
- if (node instanceof TreeObject) {
- return ((TreeObject) node).getParent();
+ if (node instanceof TreeParent) {
+ return ((TreeParent) node).getParent();
}
return null;
}
if (node instanceof ResultTreeParent) {
ResultTreeParent rtp = (ResultTreeParent) node;
// we dig the tree recursivly
- for (TreeObject to : rtp.getChildren())
+ for (Object to : rtp.getChildren())
setIsPassed((StatusAware) to);
// we set is passed
- for (TreeObject to : rtp.getChildren()) {
+ for (Object to : rtp.getChildren()) {
if (!((StatusAware) to).isPassed()) {
rtp.isPassed = false;
return;
}
}
- public class ResultTreeObject extends TreeObject implements StatusAware {
+ public class ResultTreeObject extends TreeParent implements StatusAware {
public ResultTreeObject(String name) {
super(name);
public ResultPartNode(String label, Integer status, String message) {
super(label);
+ log.debug("Creating new leaf with label : " + label);
handleStatus(status);
this.message = message;
}