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;
import org.simantics.ui.workbench.PerspectiveBarsActivator;
import org.simantics.ui.workbench.PerspectiveContextActivator;
import org.simantics.utils.logging.TimeLogger;
-import org.simantics.utils.threads.ExecutorWorker;
-import org.simantics.utils.threads.ThreadUtils;
import org.simantics.utils.ui.dialogs.ShowError;
import org.simantics.utils.ui.dialogs.ShowMessage;
import org.slf4j.Logger;
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();
- ExecutorWorker.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 {
import org.simantics.graph.diff.Diff;
import org.simantics.graph.diff.TransferableGraphDelta1;
import org.simantics.internal.Activator;
+import org.simantics.internal.TimedSessionCache;
import org.simantics.internal.startup.StartupExtensions;
import org.simantics.layer0.Layer0;
import org.simantics.operation.Layer0X;
import org.simantics.utils.datastructures.Pair;
import org.simantics.utils.logging.TimeLogger;
import org.simantics.utils.strings.EString;
+import org.simantics.utils.threads.ExecutorWorker;
+import org.simantics.utils.threads.ThreadUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
progress.worked(10);
+ // NOP at the moment
+ TimedSessionCache.close();
+
+ progress.subTask("Thread pools");
+ ThreadUtils.shutdown();
+ ExecutorWorker.shutdown();
+ progress.worked(5);
+
running = false;
progress.subTask("Close Database Session");
if (sessionContext != null) {
// Make sure Simantics clipboard doesn't store unwanted session data references.
Simantics.setClipboard(new SimanticsClipboardImpl());
- progress.worked(30);
+ progress.worked(50);
session = null;
projectResource = null;
}
progress.worked(10);
+ progress.subTask("Clear index status");
+ try {
+ // Everything ok, clear index dirty state.
+ DatabaseIndexing.clearAllDirty();
+ } catch (IOException e) {
+ LOGGER.error("Problems encountered while refreshing database index states, see exception for details.", e);
+ }
+ progress.worked(5);
+
if (clearTemporaryFiles) {
progress.subTask("Clearing Workspace Temporary Directory");
try {