From: jsimomaa Date: Mon, 5 Jun 2017 11:54:08 +0000 (+0300) Subject: Do not merge TG if it is not set as immutable X-Git-Tag: v1.31.0~334^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=5b21743da88a440aa1e90f221029c9f44fc22170;p=simantics%2Fplatform.git Do not merge TG if it is not set as immutable refs #7274 Change-Id: I8a13dc2b0bb0cc3cc98c5f661da8b46dae7e0455 --- diff --git a/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java b/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java index d5b223460..faee6944d 100644 --- a/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java +++ b/bundles/org.simantics/src/org/simantics/SimanticsPlatform.java @@ -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();