X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.workbench%2Fsrc%2Forg%2Fsimantics%2Fworkbench%2Finternal%2FSimanticsWorkbenchAdvisor.java;h=8a8b493753e3be04b14156483ba9f4df63dba9a8;hp=f5bda18b0a137816c209b12972bfeb346605eb2e;hb=668e9c1fb8b68a519e8126fbc71bab47d3b10c9b;hpb=85fd9f0a35ca2d7018b316bc8bcc280513b47243 diff --git a/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchAdvisor.java b/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchAdvisor.java index f5bda18b0..8a8b49375 100644 --- a/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchAdvisor.java +++ b/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchAdvisor.java @@ -88,6 +88,7 @@ import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.framework.Version; import org.simantics.CancelStartupException; +import org.simantics.DatabaseBaselines; import org.simantics.PlatformException; import org.simantics.Simantics; import org.simantics.SimanticsPlatform; @@ -105,7 +106,6 @@ import org.simantics.ui.SimanticsUI; import org.simantics.ui.jobs.SessionGarbageCollectorJob; import org.simantics.ui.workbench.PerspectiveBarsActivator; import org.simantics.ui.workbench.PerspectiveContextActivator; -import org.simantics.ui.workbench.WorkbenchShutdownService; import org.simantics.utils.logging.TimeLogger; import org.simantics.utils.ui.dialogs.ShowError; import org.simantics.utils.ui.dialogs.ShowMessage; @@ -432,6 +432,11 @@ public class SimanticsWorkbenchAdvisor extends WorkbenchAdvisor { if (PROFILE_PLATFORM_STARTUP) mon = new TimingProgressMonitor(); SimanticsPlatform.INSTANCE.startUp(databaseDriverId, mon, workspacePolicy, ontologyPolicy, requireSynchronize, new JFaceUserAgent()); + if(DatabaseBaselines.shouldCreateAutomaticBaseline(SimanticsPlatform.INSTANCE.databaseExists() != null)) { + SimanticsPlatform.INSTANCE.shutdown(null); + DatabaseBaselines.createAutomaticBaseline(SimanticsPlatform.INSTANCE.dbLocation()); + SimanticsPlatform.INSTANCE.reconnect(Simantics.getDefaultDatabaseDriver()); + } // Make sure that the default perspective comes from the project if // the project has set ProjectKeys#DEFAULT_PERSPECTIVE.