+ public static boolean openDNDiagramWithSelection(Display display, List<Resource> dnElements) throws DatabaseException {
+ if (dnElements.isEmpty())
+ return false;
+
+ Input in = Simantics.getSession().syncRequest(
+ new ElementToInput(dnElements.get(0)));
+ if (in == null)
+ return false;
+
+ SWTUtils.asyncExec(display,
+ () -> openDNDiagramEditorWithSelection(in, dnElements.toArray()));
+ return true;
+ }
+