From 5b21743da88a440aa1e90f221029c9f44fc22170 Mon Sep 17 00:00:00 2001 From: jsimomaa Date: Mon, 5 Jun 2017 14:54:08 +0300 Subject: [PATCH] Do not merge TG if it is not set as immutable refs #7274 Change-Id: I8a13dc2b0bb0cc3cc98c5f661da8b46dae7e0455 --- .../src/org/simantics/SimanticsPlatform.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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(); -- 2.47.1