code: public void initTree(String filter) {
  
          m_root.expandAll();
          m_root.matchAll(filter);
          List<NavigationNode> leaves = m_root.getLeaves();
          m_root.markAsKeep();
          for (NavigationNode leaf : leaves) {
              leaf.setIsLeaf(true);
              NavigationNode current = leaf;
              while ((current != null) && (current != m_root) && !current.isMatch()) {
                  current = current.getParent();
              }
              while (current != null) {
                  current.markAsKeep();
                  current = current.getParent();
              }
  
          }
          m_root.removeUnmarkedNodes();
      }
docs: Constructs the filtered navigation tree.<p>
  
  @param filter the filter string