private static Transferable getContentsToPasteToEditor(@Nullable Producer<? extends Transferable> producer) {
    if (producer == null) {
      return CopyPasteManager.getInstance().getContents();
    }
    else {
      return producer.produce();
    }
  }
private static Transferable getContentsToPasteToEditor(@Nullable Producer<? extends Transferable> producer)