void (@NotNull DataContext dataContext) { List<TreePath> paths = ContainerUtil.sorted(Arrays.asList(Objects.requireNonNull(myTree.getSelectionPaths())), TreeUtil.getDisplayOrderComparator(myTree)); CopyPasteManager.getInstance().setContents(new StringSelection(StringUtil.join(paths, path -> { Object node = path.getLastPathComponent(); if (node instanceof ChangesBrowserNode) { return ((ChangesBrowserNode<?>)node).getTextPresentation(); } else { return node.toString(); } }, "\n"))); }