X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fui%2FdiagramEditor%2Fe4%2FDiagramViewer.java;h=d0bf18b836a3521621fde2d93d04c735fcc05a23;hb=HEAD;hp=61afc48f439a34724a8806f3cab6efd3b117aa48;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/e4/DiagramViewer.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/e4/DiagramViewer.java index 61afc48f4..d0bf18b83 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/e4/DiagramViewer.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/e4/DiagramViewer.java @@ -158,7 +158,6 @@ import org.simantics.ui.workbench.TitleUpdater; import org.simantics.ui.workbench.ToolTipRequest; import org.simantics.ui.workbench.editor.input.InputValidationCombinators; import org.simantics.utils.DataContainer; -import org.simantics.utils.datastructures.Callback; import org.simantics.utils.datastructures.hints.HintContext; import org.simantics.utils.datastructures.hints.HintListenerAdapter; import org.simantics.utils.datastructures.hints.IHintContext; @@ -340,7 +339,7 @@ public class DiagramViewer protected Set getPropertyPageContexts() { try { - return BrowseContext.getBrowseContextClosure(SimanticsUI.getSession(), defaultPropertyBrowseContexts); + return BrowseContext.getBrowseContextClosure(Simantics.getSession(), defaultPropertyBrowseContexts); } catch (DatabaseException e) { ExceptionUtils.logAndShowError("Failed to load modeled browse contexts for property page, see exception for details.", e); return defaultPropertyBrowseContexts; @@ -362,7 +361,7 @@ public class DiagramViewer } protected void initSession() { - sessionContextProvider = SimanticsUI.getSessionContextProvider(); + sessionContextProvider = Simantics.getSessionContextProvider(); sessionContext = sessionContextProvider.getSessionContext(); } @@ -804,12 +803,9 @@ public class DiagramViewer CommonDBUtils.selectClusterSet(graph, diagramResource); DiagramGraphUtil.setDiagramDesc(graph, diagramResource, desc); } - }, new Callback() { - @Override - public void run(DatabaseException parameter) { - if (parameter != null) - ErrorLogger.defaultLogError("Failed to write default diagram page description to database, see exception for details", parameter); - } + }, e -> { + if (e != null) + ErrorLogger.defaultLogError("Failed to write default diagram page description to database, see exception for details", e); }); } @@ -961,7 +957,7 @@ public class DiagramViewer // Set initial part name according to the name given by IEditorInput host.doSetPartName(getResourceEditorInput().getName()); - Session session = SimanticsUI.peekSession(); + Session session = Simantics.peekSession(); if (session != null) { Supplier disposedCallback = () -> disposed; Display display = part.getContext().get(Shell.class).getDisplay();