@Nullable
          @Override
          public Collection<String> getTextLinesToCopy() {
            TreePath selection = getSelectionPath();
            Object value = selection == null ? null : selection.getLastPathComponent();
            if (value instanceof MessageNode messageNode) {
              return Arrays.asList(messageNode.getText());
            }
            return value == null ? null : Collections.singleton(value.toString());
          }
@Nullable
          @Override
          public Collection<String> getTextLinesToCopy()