throw new RuntimeException("Didn't find place to paste source");
}
try {
pastedJavaElements = new ArrayList<IJavaElement>();
JavaCore.addElementChangedListener(this);
SelectionDispatchAction pasteAction = getPasteAction();
if (pasteAction == null) {
throw new RuntimeException("Didn't find package explorer's paste action");
}
if (progressMonitor != null) {
progressMonitor.subTask("Pasting test source");
}
// System.out.println("Pasting into " + selection + " (" + selection.size() + ")");
pasteAction.run(selection);
if (progressMonitor != null) {
progressMonitor.worked(1);
}
} finally {
getDisplay().asyncExec(new Runnable() {