@Override
    public void mouseReleased(MouseEvent event) {
      TreePath treePathUnderMouseAfterEvent = getPathForLocation(event.getX(), event.getY());
      if (!Comparing.equal(treePathUnderMouse, treePathUnderMouseAfterEvent)) {
        event.consume(); // IDEA-338787: BasicTreeUI.checkForClickInExpandControl does not consume the event
      }
      treePathUnderMouse = null;

      setPressed(event, false);
      if (event.getButton() == MouseEvent.BUTTON1 &&
          event.getClickCount() == 2 &&
          TreeUtil.isLocationInExpandControl(Tree.this, event.getX(), event.getY())) {
        event.consume();
      }
    }
@Override
    public void mouseReleased(MouseEvent event)