Can anyone help me breaking this method and return the actual value of "stop" once "stop" is true? Notice that "stop" starting with false.
private boolean handleRoot(ITreeNode node, String rmiDefUuidInit, int columnIndex, String chartName, boolean stop) {
for (ITreeNode childNode : node.getChilds()){
if (!stop && !childNode.isSelected())
stop = true;
handleRoot(childNode, rmiDefUuidInit, columnIndex, chartName, stop);
}
return !stop;}
It seems like, my post isn't clear enough. First I put this example together so it can be simple and easy to understand. My code is much complex than that.
Here is the problem: I have a TreeViewer in which I want to select the parent node if all his children and the children's children are all selected. For performance reason I figured, I can stop as soon as I cross a none selected child-node and break the routine. This is basically my problem since the iteration continues with the value of "stop = false" as soon as my actual iteration ends.