]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Do not merge TG if it is not set as immutable 96/596/3
authorjsimomaa <jani.simomaa@gmail.com>
Mon, 5 Jun 2017 11:54:08 +0000 (14:54 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 5 Jun 2017 19:39:38 +0000 (22:39 +0300)
refs #7274

Change-Id: I8a13dc2b0bb0cc3cc98c5f661da8b46dae7e0455

bundles/org.simantics/src/org/simantics/SimanticsPlatform.java

index d5b223460a0b1d74068f31585873db4e94ba9a20..faee6944da3a356496cdbbc0f40ff710175e917f 100644 (file)
@@ -403,9 +403,10 @@ public class SimanticsPlatform implements LifecycleListener {
                                final IImportAdvisor advisor = new OntologyImportAdvisor(tg, mgmt);
                                final GraphBundle oldTG = reinstallTGs.get(tg);
 
+                               boolean createImmutable = tg.getImmutable();
+
                                if (oldTG==null) {
-                                       
-                                       boolean createImmutable = tg.getImmutable();
+
                                 session.getService(XSupport.class).setServiceMode(true, createImmutable);
 
                                        // Install TG
@@ -415,6 +416,9 @@ public class SimanticsPlatform implements LifecycleListener {
                                                log.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Import of " + tg.toString() + " was missing the following external entities:\n" + EString.implode(result.missingExternals)));
                                        }
                                } else {
+                                       if(!createImmutable)
+                                               continue;
+
                                        // Merge TG
                                        startTransaction(session, false);
                                        TransferableGraphDelta1 delta = new Diff(oldTG.getGraph(), tg.getGraph()).diff();