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