use of net.sourceforge.processdash.log.defects.DefectPhase in project processdash by dtuma.
the class MorePhaseOptionsHandler method getNodeForSelectedPhase.
private DefaultMutableTreeNode getNodeForSelectedPhase() {
if (lastSelectedPhase == null)
return null;
String phaseID = lastSelectedPhase.getTerminalPhaseID();
TreeNode root = (TreeNode) phaseOptionsTree.getModel().getRoot();
Enumeration<TreeNode> workflows = root.children();
while (workflows.hasMoreElements()) {
TreeNode oneWorkflow = workflows.nextElement();
Enumeration<DefaultMutableTreeNode> phases = oneWorkflow.children();
while (phases.hasMoreElements()) {
DefaultMutableTreeNode phaseNode = phases.nextElement();
DefectPhase onePhase = (DefectPhase) phaseNode.getUserObject();
if (phaseID == null) {
if (onePhase.phaseID == null && lastSelectedPhase.legacyPhase.equals(onePhase.legacyPhase))
return phaseNode;
} else if (phaseID.equals(onePhase.phaseID)) {
return phaseNode;
}
}
}
return null;
}
Aggregations