@Override public Object execute(ExecutionEvent event) throws ExecutionException { return watchedExecute( () -> { final EntryEditor editor = getActiveEntryEditor(); if (editor == null) { return null; } String data = fromClipboard(editor); ISelectionProvider sp = editor.getSite().getSelectionProvider(); IStructuredSelection sel = (IStructuredSelection) sp.getSelection(); TreeNode selection = (TreeNode) sel.getFirstElement(); ValueData selectionVD = ValueData.of(selection); Thype selThype = selectionVD.element().thype(); try { if (selThype instanceof CollectionThypeLike) { selection = pasteCollection(editor, selection, data); } else if (selThype instanceof SimpleThypeLike) { selection = pasteSimple(editor, selection, data); } else { ElementHelper.unsupportedThype(selThype); } } catch (Exception e) { ElementHelper.panic(log, "pasting content", e); throw e; } editor.refresh(selection, false); editor.markDirty(); return null; }); }