private void initButtons() {
    filterButton.addActionListener(new ActionListener() {
      
      @Override
      public void actionPerformed(ActionEvent event) {
        String targetClassName = searchField.getText();
        if ( targetClassName.isEmpty() ) {
          return;
        }
        root.removeAllChildren();
        Map<DefaultMutableTreeNode, Set<DefaultMutableTreeNode>> filteredNodes = new HashMap<DefaultMutableTreeNode, Set<DefaultMutableTreeNode>>();
        for ( Map.Entry<String, DefaultMutableTreeNode> mapEntry : nodes.entrySet() ) {
          if ( mapEntry.getKey().contains(targetClassName) ) {
            DefaultMutableTreeNode underRootNode = nodes.get(mapEntry.getKey().split("/")[0]);
            Set<DefaultMutableTreeNode> nodesToExpand = filteredNodes.get(underRootNode);
            if ( nodesToExpand == null ) {
              nodesToExpand = new HashSet<DefaultMutableTreeNode>();
            }
            String[] classesNamesInPath = mapEntry.getKey().split("/");
            DefaultMutableTreeNode targetNode = mapEntry.getValue();
            for (int i = classesNamesInPath.length - 1; i > -1; i-- ) {
              if ( targetNode.getUserObject().toString().contains(targetClassName) ) {
                nodesToExpand.add(targetNode);
              } else {
                targetNode = (DefaultMutableTreeNode) targetNode.getParent();
              }
            }
            filteredNodes.put(underRootNode, nodesToExpand);
          }
        }
        for ( Map.Entry<DefaultMutableTreeNode, Set<DefaultMutableTreeNode>> filteredNode : filteredNodes.entrySet() ) {
          root.add(filteredNode.getKey());
          for ( DefaultMutableTreeNode nodeToExpand : filteredNode.getValue() ){
            classesTree.expandPath(new TreePath(nodeToExpand.getPath()));
          }
        }
        EventMgr.getMgr(mainMgr).dispatch(new FilterChangedEvent(targetClassName));
        classesTree.updateUI();
      }
    });
    
    releaseButton.addActionListener(new ActionListener() {
      
      @Override
      public void actionPerformed(ActionEvent arg0) {
        root.removeAllChildren();
        addAllChildren(root, storage.getUnderRootNodes());//fill tree with all classes
        EventMgr.getMgr(mainMgr).dispatch(new FilterChangedEvent(""));
        classesTree.updateUI();
      }
    });
  }