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?a=commitdiff_plain;h=refs%2Fchanges%2F81%2F3781%2F2;p=simantics%2Fplatform.git 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 {