From cda637e8caba5a58f2cc5ec0a435070f628fb2fb Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Fri, 7 Dec 2018 13:31:48 +0200 Subject: [PATCH] Changed SimanticsUI use to Simantics gitlab #1 --- .../org/simantics/g3d/csg/adapters/CSGSolidModelAdapter.java | 4 ++-- .../src/org/simantics/g3d/csg/scenegraph2/SchemaBuilder.java | 4 ++-- .../src/org/simantics/g3d/wizard/ModelExportWizard.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/adapters/CSGSolidModelAdapter.java b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/adapters/CSGSolidModelAdapter.java index e1000c16..972d7977 100644 --- a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/adapters/CSGSolidModelAdapter.java +++ b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/adapters/CSGSolidModelAdapter.java @@ -30,7 +30,7 @@ import org.simantics.objmap.graph.Mappings; import org.simantics.objmap.graph.schema.IMappingSchema; import org.simantics.objmap.structural.IStructuralObject; import org.simantics.opencascade.SolidModelProvider; -import org.simantics.ui.SimanticsUI; +import org.simantics.Simantics; public class CSGSolidModelAdapter implements SolidModelProvider, IAdaptable, IStructuralObject { @@ -42,7 +42,7 @@ public class CSGSolidModelAdapter implements SolidModelProvider, IAdaptable, ISt @Override public Collection getModel() throws Exception { - return SimanticsUI.getSession().syncRequest(new Read>() { + return Simantics.getSession().syncRequest(new Read>() { @Override public Collection perform(ReadGraph graph) throws DatabaseException { diff --git a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/SchemaBuilder.java b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/SchemaBuilder.java index 08d2f76b..b44a7693 100644 --- a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/SchemaBuilder.java +++ b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/scenegraph2/SchemaBuilder.java @@ -18,12 +18,12 @@ import org.simantics.db.request.Read; import org.simantics.objmap.graph.schema.IMappingSchema; import org.simantics.objmap.graph.schema.MappingSchemas; import org.simantics.objmap.graph.schema.SimpleSchema; -import org.simantics.ui.SimanticsUI; +import org.simantics.Simantics; public class SchemaBuilder { public static IMappingSchema getSchema() throws DatabaseException{ - return SimanticsUI.getSession().syncRequest(new Read>() { + return Simantics.getSession().syncRequest(new Read>() { @Override public IMappingSchema perform(ReadGraph g) throws DatabaseException { diff --git a/org.simantics.g3d/src/org/simantics/g3d/wizard/ModelExportWizard.java b/org.simantics.g3d/src/org/simantics/g3d/wizard/ModelExportWizard.java index 53641e51..9eddcd44 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/wizard/ModelExportWizard.java +++ b/org.simantics.g3d/src/org/simantics/g3d/wizard/ModelExportWizard.java @@ -33,7 +33,7 @@ import org.eclipse.ui.IWorkbench; import org.simantics.db.management.ISessionContext; import org.simantics.project.IProject; import org.simantics.project.ProjectKeys; -import org.simantics.ui.SimanticsUI; +import org.simantics.Simantics; import org.simantics.utils.ui.ErrorLogger; import org.simantics.utils.ui.ExceptionUtils; import org.simantics.utils.ui.workbench.StringMemento; @@ -61,7 +61,7 @@ public abstract class ModelExportWizard extends Wizard i public void init(IWorkbench workbench, IStructuredSelection selection) { readPreferences(); - ISessionContext ctx = SimanticsUI.getSessionContext(); + ISessionContext ctx = Simantics.getSessionContext(); if (ctx == null) return; IProject project = ctx.getHint(ProjectKeys.KEY_PROJECT); -- 2.47.1