List of usage examples for com.intellij.openapi.editor EditorModificationUtil getContentsToPasteToEditor
@Nullable public static Transferable getContentsToPasteToEditor(@Nullable Producer<? extends Transferable> producer)
From source file:com.vladsch.MissingInActions.util.ClipboardCaretContent.java
License:Apache License
@Nullable public static Transferable getTransferable(final @NotNull Editor editor, DataContext dataContext) { try {/*w w w . jav a 2 s .c o m*/ Producer<Transferable> producer = PasteAction.TRANSFERABLE_PROVIDER.getData(dataContext); //noinspection UnnecessaryLocalVariable Transferable transferable = EditorModificationUtil.getContentsToPasteToEditor(producer); return transferable; } catch (Throwable e) { logger.error("error", e); } return null; }