private static void moveElementInsideGroup(final Tool tool, final ToolsGroup group, Direction dir) {
    if (dir == Direction.UP) {
      group.moveElementUp(tool);
    }
    else {
      group.moveElementDown(tool);
    }
  }
private static void moveElementInsideGroup(final Tool tool, final ToolsGroup group, Direction dir)