public static @Nullable CaretStateTransferableData getFrom(Transferable t) {
    try {
      return t.isDataFlavorSupported(FLAVOR) ? (CaretStateTransferableData)t.getTransferData(FLAVOR) : null;
    }
    catch (Exception e) {
      LOG.error(e);
    }
    return null;
  }
public static @Nullable CaretStateTransferableData getFrom(Transferable t)