]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/ToggleExternalFlag.java
Remove usage of deprecated SimanticsUI-methods
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / modelBrowser / handlers / ToggleExternalFlag.java
index d03199d9c72f549f161d729fc82503fa749adfdd..11c6af8bc6ece2fd078911e67db04b7e2d24ed1b 100644 (file)
@@ -26,6 +26,7 @@ import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.commands.IElementUpdater;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.menus.UIElement;
+import org.simantics.Simantics;
 import org.simantics.db.ReadGraph;
 import org.simantics.db.Resource;
 import org.simantics.db.Session;
@@ -53,7 +54,7 @@ public class ToggleExternalFlag extends AbstractHandler implements IElementUpdat
         if (resource == null)
             return null;
 
-        SimanticsUI.getSession().asyncRequest(new WriteRequest() {
+        Simantics.getSession().asyncRequest(new WriteRequest() {
             @Override
             public void perform(WriteGraph g) throws DatabaseException {
                 DiagramResource dr = DiagramResource.getInstance(g);
@@ -82,7 +83,7 @@ public class ToggleExternalFlag extends AbstractHandler implements IElementUpdat
         }
 
         // Get the current value for the State object
-        Session s = SimanticsUI.peekSession();
+        Session s = Simantics.peekSession();
         if (s != null) {
             Boolean value = Boolean.TRUE;
             IWorkbenchSite site = (IWorkbenchSite) parameters.get("org.eclipse.ui.part.IWorkbenchPartSite");