X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics%2Fsrc%2Forg%2Fsimantics%2FSimanticsPlatform.java;h=7e6bd9dd9be5c7c134baff73223061f535ce6e92;hp=ba29a654a461370360c61ee399963363ff1e6e7f;hb=ffdf83729b496d5afe74c7888075bb17ce1c4bbb;hpb=621bec7b0f646eb559d24d01183bc8c5c3bbef1a diff --git a/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java b/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java index ba29a654a..7e6bd9dd9 100644 --- a/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java +++ b/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java @@ -284,9 +284,9 @@ public class SimanticsPlatform implements LifecycleListener { // Check hash of transferable graph to know whether to update or not. if (platformBundle.getHashcode() == existingBundle.getHashcode()) continue; - System.out.println("Ontology hashcodes do not match: platform bundle=" - + platformBundle.getVersionedId() + ", hash=" + platformBundle.getHashcode() - + "; existing bundle=" + existingBundle.getVersionedId() + ", hash=" + existingBundle.getHashcode()); + //System.out.println("Ontology hashcodes do not match: platform bundle=" + // + platformBundle.getVersionedId() + ", hash=" + platformBundle.getHashcode() + // + "; existing bundle=" + existingBundle.getVersionedId() + ", hash=" + existingBundle.getHashcode()); reinstallTGs.put(platformBundle, existingBundle); } } @@ -399,7 +399,7 @@ public class SimanticsPlatform implements LifecycleListener { boolean changes = TransferableGraphs.hasChanges(readGraph(), oldResources, delta); endTransaction(); if (!changes) { - log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Nothing to merge for "+tg.toString())); + //log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Nothing to merge for "+tg.toString())); continue; } @@ -731,7 +731,17 @@ public class SimanticsPlatform implements LifecycleListener { // 1. Assert there is a database at /db session = setupDatabase(databaseDriverId, progressMonitor, workspacePolicy, userAgent); TimeLogger.log("Database setup complete"); - + + // 1.1 + XSupport support = session.getService(XSupport.class); + if (support.rolledback()) { + try { + DatabaseIndexing.deleteAllIndexes(); + } catch (IOException e) { + throw new PlatformException(e); + } + } + // 2. Assert all graphs, and correct versions, are installed to the database synchronizeOntologies(progressMonitor, ontologyPolicy, requireSynchronize); TimeLogger.log("Synchronized ontologies");