From: Tuukka Lehtonen Date: Tue, 20 Sep 2016 07:33:37 +0000 (+0300) Subject: Sync git svn branch with SVN repository r33218. X-Git-Tag: v1.25.0~106^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=a3717830e446a0a2e4bde5c567c780bae9c36188 Sync git svn branch with SVN repository r33218. refs #6692 refs #6568 --- diff --git a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/adapter/SpreadsheetBookRemover.java b/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/adapter/SpreadsheetBookRemover.java index cf7c9ce7a..3ff2e9a3e 100644 --- a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/adapter/SpreadsheetBookRemover.java +++ b/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/adapter/SpreadsheetBookRemover.java @@ -23,10 +23,12 @@ public class SpreadsheetBookRemover extends EntityRemover { @Override public void remove(WriteGraph graph) throws DatabaseException { - String bookURI = graph.getURI(resource); - for (String realmId : SpreadsheetSessionManager.getInstance().getRealms()) { - if (realmId.startsWith(bookURI)) { - SpreadsheetSessionManager.getInstance().removeRealm(realmId); + String bookURI = graph.getPossibleURI(resource); + if (bookURI != null) { + for (String realmId : SpreadsheetSessionManager.getInstance().getRealms()) { + if (realmId.startsWith(bookURI)) { + SpreadsheetSessionManager.getInstance().removeRealm(realmId); + } } } super.remove(graph); diff --git a/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java b/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java index ba29a654a..1754b0071 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; }