boolean (@NotNull MouseEvent e) { TreePath path = getClosestPathForLocation(e.getX(), e.getY()); if (path == null) return false; Object lastComponent = path.getLastPathComponent(); if (lastComponent instanceof LoadingNode) return false; return myTreeModel.isLeaf(lastComponent) && lastComponent instanceof ServiceViewItem && ((ServiceViewItem)lastComponent).getViewDescriptor().handleDoubleClick(e); }