X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.ui%2Fsrc%2Forg%2Fsimantics%2Fui%2Fworkbench%2FResourceEditorPart.java;h=ca06a5d7b5d538c9091fb8b71d7f45d26ad906d3;hb=fbfec9e8c7d8d768d9c6327060d9333b2feaea81;hp=5689cfa4b7dee2b8a655ad59e6cbe2746f868c27;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/ResourceEditorPart.java b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/ResourceEditorPart.java index 5689cfa4b..ca06a5d7b 100644 --- a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/ResourceEditorPart.java +++ b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/ResourceEditorPart.java @@ -9,6 +9,7 @@ * Contributors: * VTT Technical Research Centre of Finland - initial API and implementation * Semantum Oy - issue #4384 + * Semantum Oy - issue #7737 *******************************************************************************/ package org.simantics.ui.workbench; @@ -19,14 +20,16 @@ import org.eclipse.jface.action.IStatusLineManager; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.ui.PartInitException; +import org.eclipse.ui.internal.PartSite; +import org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor; import org.eclipse.ui.part.EditorPart; +import org.simantics.Simantics; import org.simantics.db.Resource; import org.simantics.db.Session; import org.simantics.db.common.request.ParametrizedRead; -import org.simantics.db.event.ChangeListener; import org.simantics.db.management.ISessionContext; -import org.simantics.ui.SimanticsUI; /** * ResourceEditorPart is a base implementation for editors that support @@ -41,6 +44,7 @@ import org.simantics.ui.SimanticsUI; *
* * @author Tuukka Lehtonen + * @author Jani Simomaa */ public abstract class ResourceEditorPart extends EditorPart implements IResourceEditorPart { @@ -78,15 +82,53 @@ public abstract class ResourceEditorPart extends EditorPart implements IResource // Set initial part name according to the name given by IEditorInput setPartName(getEditorInput().getName()); - Session session = SimanticsUI.peekSession(); + Session session = Simantics.peekSession(); if (session != null) { Supplier