public void updateSelection() {
    T selection = getSelection();

    FilteringTree.Matching currentMatching = selection != null ? checkMatching(selection) : FilteringTree.Matching.NONE;
    if (currentMatching == FilteringTree.Matching.FULL) {
      return;
    }

    T fullMatch = findNextMatchingNode(selection, true);
    if (fullMatch != null) {
      select(fullMatch);
    }
    else if (currentMatching == FilteringTree.Matching.NONE) {
      T partialMatch = findNextMatchingNode(selection, false);
      if (partialMatch != null) {
        select(partialMatch);
      }
    }
  }
public void updateSelection()