From a3717830e446a0a2e4bde5c567c780bae9c36188 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Tue, 20 Sep 2016 10:33:37 +0300 Subject: [PATCH] Sync git svn branch with SVN repository r33218. refs #6692 refs #6568 --- .../graph/adapter/SpreadsheetBookRemover.java | 10 ++++++---- .../src/org/simantics/SimanticsPlatform.java | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) 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; } -- 2.47.1