From: Antti Villberg Date: Tue, 14 Jan 2020 13:38:06 +0000 (+0200) Subject: Support ontology install option trueWhenDeployed also during development X-Git-Tag: v1.43.0~136^2~2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=5b6358d87458715cad02d51ee5cd944814d1db4a;hp=de52ee5ec5e30f87eb2953490b54b7afa84259c9 Support ontology install option trueWhenDeployed also during development gitlab #444 Change-Id: I038de840b1b76b3638338542d23baae2ba2a903f --- diff --git a/bundles/org.simantics.project/src/org/simantics/project/management/PlatformUtil.java b/bundles/org.simantics.project/src/org/simantics/project/management/PlatformUtil.java index af59dbfc1..8f93d24ab 100644 --- a/bundles/org.simantics.project/src/org/simantics/project/management/PlatformUtil.java +++ b/bundles/org.simantics.project/src/org/simantics/project/management/PlatformUtil.java @@ -479,7 +479,18 @@ public class PlatformUtil { private static boolean isImmutable(Bundle bundle) { String immutable = (String) bundle.getHeaders().get("Immutable"); - return immutable != null ? "true".equals(immutable) : true; + if(immutable == null) + return true; + if("false".equals(immutable)) + return false; + if("trueWhenDeployed".equals(immutable)) { + String installHint = System.getProperty("installOntologiesAsDeployed"); + if("true".equals(installHint)) + return true; + else + return false; + } + return true; } public static class TGInfo {