]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Merge commit 'a371783'
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 20 Sep 2016 07:34:24 +0000 (10:34 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 20 Sep 2016 07:34:24 +0000 (10:34 +0300)
bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/adapter/SpreadsheetBookRemover.java
bundles/org.simantics/src/org/simantics/SimanticsPlatform.java

index cf7c9ce7a6f13120a75d40424b3c5f89642e0a3c..3ff2e9a3e2fb1ba9f3f3d869cbfa4242ef7b97af 100644 (file)
@@ -23,10 +23,12 @@ public class SpreadsheetBookRemover extends EntityRemover {
     @Override\r
     public void remove(WriteGraph graph) throws DatabaseException {\r
         \r
-        String bookURI = graph.getURI(resource);\r
-        for (String realmId : SpreadsheetSessionManager.getInstance().getRealms()) {\r
-            if (realmId.startsWith(bookURI)) {\r
-                SpreadsheetSessionManager.getInstance().removeRealm(realmId);\r
+        String bookURI = graph.getPossibleURI(resource);\r
+        if (bookURI != null) {\r
+            for (String realmId : SpreadsheetSessionManager.getInstance().getRealms()) {\r
+                if (realmId.startsWith(bookURI)) {\r
+                    SpreadsheetSessionManager.getInstance().removeRealm(realmId);\r
+                }\r
             }\r
         }\r
         super.remove(graph);\r
index ba29a654a461370360c61ee399963363ff1e6e7f..1754b00715bd2b6a6669479174845ee4ccb1d1cb 100644 (file)
@@ -284,9 +284,9 @@ public class SimanticsPlatform implements LifecycleListener {
                     // Check hash of transferable graph to know whether to update or not.\r
                     if (platformBundle.getHashcode() == existingBundle.getHashcode())\r
                         continue;\r
-                    System.out.println("Ontology hashcodes do not match: platform bundle="\r
-                            + platformBundle.getVersionedId() + ", hash=" + platformBundle.getHashcode()\r
-                            + "; existing bundle=" + existingBundle.getVersionedId() + ", hash=" + existingBundle.getHashcode());\r
+                    //System.out.println("Ontology hashcodes do not match: platform bundle="\r
+                    //        + platformBundle.getVersionedId() + ", hash=" + platformBundle.getHashcode()\r
+                    //        + "; existing bundle=" + existingBundle.getVersionedId() + ", hash=" + existingBundle.getHashcode());\r
                     reinstallTGs.put(platformBundle, existingBundle);\r
                 }\r
             }\r
@@ -399,7 +399,7 @@ public class SimanticsPlatform implements LifecycleListener {
                                        boolean changes = TransferableGraphs.hasChanges(readGraph(), oldResources, delta);\r
                                        endTransaction();\r
                                        if (!changes) {\r
-                                           log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Nothing to merge for "+tg.toString()));\r
+                                           //log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Nothing to merge for "+tg.toString()));\r
                                            continue;\r
                                        }\r
 \r