void (@Nullable final Object tag, @NotNull MouseEvent event) { if (tag instanceof VcsLinkedTextComponent textWithLink) { final TreePath path = myRenderer.getTextRenderer().getTree().getPathForLocation(event.getX(), event.getY()); if (path == null) return; //path could not be null if tag not null; see com.intellij.dvcs.push.ui.PushLogTreeUtil.getTagAtForRenderer Object node = path.getLastPathComponent(); if ((!(node instanceof DefaultMutableTreeNode))) { LOG.warn("Incorrect last path component: " + node); return; } textWithLink.fireOnClick((DefaultMutableTreeNode)node, event); } if (tag instanceof Runnable) { ((Runnable)tag).run(); } }