From: Tuukka Lehtonen Date: Mon, 5 Jun 2017 20:16:17 +0000 (+0300) Subject: Merge "Do not merge TG if it is not set as immutable" X-Git-Tag: v1.31.0~334 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=e3944c748c450a0760b9525e53e36b96180103b4;hp=9c866c82a391db00ae11913c61d39d7dc46b14d0 Merge "Do not merge TG if it is not set as immutable" --- 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();