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=6f70bc56ee3a319edf5b703ff47e84eee580e9bf;hp=9169c64b3eca5a207b58e4b5900e45708092ed21;hb=6a98de0ec279869a23d14cb9b3ed6cb0999a820d;hpb=571533bb34f06bbe3e868dd730d4cf5e793039a4 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 9169c64b3..6f70bc56e 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 @@ -91,13 +91,13 @@ import org.simantics.Simantics; import org.simantics.SimanticsPlatform; import org.simantics.SimanticsPlatform.OntologyRecoveryPolicy; import org.simantics.SimanticsPlatform.RecoveryPolicy; +import org.simantics.TimingProgressMonitor; import org.simantics.application.arguments.IArguments; import org.simantics.application.arguments.SimanticsArguments; import org.simantics.db.common.Indexing; import org.simantics.db.indexing.DatabaseIndexing; import org.simantics.db.procore.server.environment.RebootRequiredException; import org.simantics.db.procore.server.environment.windows.Product; -import org.simantics.internal.TimedSessionCache; import org.simantics.project.IProject; import org.simantics.project.ProjectKeys; import org.simantics.ui.SimanticsUI; @@ -105,7 +105,6 @@ import org.simantics.ui.jobs.SessionGarbageCollectorJob; import org.simantics.ui.workbench.PerspectiveBarsActivator; import org.simantics.ui.workbench.PerspectiveContextActivator; import org.simantics.utils.logging.TimeLogger; -import org.simantics.utils.threads.ThreadUtils; import org.simantics.utils.ui.dialogs.ShowError; import org.simantics.utils.ui.dialogs.ShowMessage; import org.slf4j.Logger; @@ -409,6 +408,7 @@ public class SimanticsWorkbenchAdvisor extends WorkbenchAdvisor { if (args.contains(SimanticsArguments.DO_NOT_SYNCHRONIZE_ONTOLOGIES)) { requireSynchronize = false; + ontologyPolicy = OntologyRecoveryPolicy.Bypass; } if (args.contains(SimanticsArguments.DISABLE_INDEX)) { @@ -735,29 +735,13 @@ public class SimanticsWorkbenchAdvisor extends WorkbenchAdvisor { try { try { progress.subTask("Platform"); - SimanticsPlatform.INSTANCE.shutdown(progress.newChild(50)); + SimanticsPlatform.INSTANCE.shutdown(progress.newChild(100)); } catch (PlatformException e) { Activator.logError("Problems encountered while shutting down Simantics platform, see exception for details.", e); } progress.subTask("Remaining database connections"); SimanticsUI.closeSessions(); - progress.worked(20); - TimedSessionCache.close(); - progress.worked(20); - - progress.subTask("Thread pools"); - ThreadUtils.shutdown(); - progress.worked(5); - - progress.subTask("Clear index status"); - try { - // Everything ok, clear index dirty state. - DatabaseIndexing.clearAllDirty(); - } catch (IOException e) { - Activator.logError("Problems encountered while refreshing database index states, see exception for details.", e); - } - progress.worked(5); progress.setWorkRemaining(0); } finally { @@ -864,7 +848,7 @@ public class SimanticsWorkbenchAdvisor extends WorkbenchAdvisor { } if (perspectiveId == null) { - IProject project = SimanticsUI.peekProject(); + IProject project = Simantics.peekProject(); if (project != null) perspectiveId = project.getHint(ProjectKeys.DEFAULT_PERSPECTIVE); }