private void moveElementInsideGroup(final Tool tool, final ToolsGroup group, Direction dir) {
   if (dir == Direction.UP) {
     group.moveElementUp(tool);
   } else {
     group.moveElementDown(tool);
   }
 }
 private String[] getGroups() {
   ArrayList<String> result = new ArrayList<String>();
   ToolsGroup[] groups = getGroupList();
   for (ToolsGroup group : groups) {
     result.add(group.getName());
   }
   return ArrayUtil.toStringArray(result);
 }
  private CheckedTreeNode findGroupNode(final String group) {
    for (int i = 0; i < getTreeRoot().getChildCount(); i++) {
      CheckedTreeNode node = (CheckedTreeNode) getTreeRoot().getChildAt(i);
      ToolsGroup g = (ToolsGroup) node.getUserObject();
      if (Comparing.equal(group, g.getName())) return node;
    }

    return null;
  }
  private CheckedTreeNode insertNewGroup(final ToolsGroup groupCopy) {
    CheckedTreeNode root = getTreeRoot();
    CheckedTreeNode groupNode = new CheckedTreeNode(groupCopy);
    root.add(groupNode);
    for (Tool tool : groupCopy.getElements()) {
      insertNewTool(groupNode, tool);
    }

    return groupNode;
  }
  void reset() {
    ToolsGroup[] groups = ToolManager.getInstance().getGroups();

    for (ToolsGroup group : groups) {
      insertNewGroup((ToolsGroup) group.copy());
    }

    if ((getTreeRoot()).getChildCount() > 0) {
      myTree.setSelectionInterval(0, 0);
    } else {
      myTree.getSelectionModel().clearSelection();
    }
    (getModel()).nodeStructureChanged(null);

    TreeUtil.expand(myTree, 5);

    myIsModified = false;

    update();
  }