private static void previewNode(Project project, TreePath path, UsagePreviewPanel usagePreviewPanel, SimpleColoredComponent previewTitle) {
    if (path == null) return;
    Object node = path.getLastPathComponent();
    Object userObject = TreeUtil.getUserObject(node);
    if (userObject instanceof UsageInfo2UsageAdapter adapter) {
      VirtualFile vFile = adapter.getFile();
      if (vFile != null) {
        previewTitle.clear();
        previewTitle.append(vFile.getPresentableName(), REGULAR_ATTRIBUTES);
        previewTitle.append(spaceAndThinSpace() + getPresentablePath(project, vFile),
                            new SimpleTextAttributes(STYLE_PLAIN, UIUtil.getContextHelpForeground()));
      }
      usagePreviewPanel.updateLayout(project, List.of(adapter.getUsageInfo()));
    }
  }
private static void previewNode(Project project, TreePath path, UsagePreviewPanel usagePreviewPanel, SimpleColoredComponent previewTitle)