Révision 1985

tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1985)
1526 1526
		}
1527 1527
	}
1528 1528

  
1529

  
1530 1529
	/**
1531 1530
	 * Gets the first child.
1532 1531
	 * @param classSimpleName
......
1594 1593
	public static TXMResult getResult(TXMResult root, String nodePath)	{
1595 1594
		TXMResult result = null;
1596 1595
		if(root.getParametersNodePath().equals(nodePath))	{
1597
			result = root;
1596
			return root; // root is the node we are looking for
1598 1597
		}
1599 1598
		else	{
1600
			List<TXMResult> results = root.getDeepChildren();
1599
			List<TXMResult> results = root.getChildren();
1601 1600
			for (int i = 0; i < results.size(); i++) {
1602 1601
				if(results.get(i).getParametersNodePath().equals(nodePath))	{
1603
					result = results.get(i);
1604
					break;
1602
					return results.get(i); // a direct children is the node we are looking for
1605 1603
				}
1606 1604
			}
1605
			
1606
			for (int i = 0; i < results.size(); i++) {
1607
				TXMResult r = getResult(results.get(i), nodePath);
1608
				if (r != null) {
1609
					return r; // a deep children is the node we are looking for
1610
				}
1611
			}
1607 1612
		}
1608
		return result;
1613
		return null; // not found
1609 1614
	}
1610 1615

  
1611 1616
	/**

Formats disponibles : Unified diff