From: Marko Luukkainen Date: Thu, 17 Feb 2022 07:09:29 +0000 (+0200) Subject: Disable SCL Issue provider by default X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F4893%2F1;p=simantics%2Fplatform.git Disable SCL Issue provider by default Use org.simantics.scl.issues=true system property to get it back. gitlab #806 Change-Id: I93170cad18959e1c51d2832d725c9794190bb246 --- diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/issue/SCLExpressionIssueProvider.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/issue/SCLExpressionIssueProvider.java index 1d04928c8..ccffb8e77 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/issue/SCLExpressionIssueProvider.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/issue/SCLExpressionIssueProvider.java @@ -1,6 +1,7 @@ package org.simantics.modeling.scl.issue; import java.util.ArrayList; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Objects; @@ -45,11 +46,31 @@ public class SCLExpressionIssueProvider implements SCLIssueProvider { @Override public SCLIssueProvider getSCLIssueProvider() { - return new SCLExpressionIssueProvider(); + if (Boolean.getBoolean("org.simantics.scl.issues")) + return new SCLExpressionIssueProvider(); + else + return new DummyIssueProvider(); } } + public static class DummyIssueProvider implements SCLIssueProvider { + @Override + public void listenIssues(Runnable callback) { + + } + + @Override + public List getIssues() { + return Collections.emptyList(); + } + + @Override + public void dispose() { + + } + } + private static final Logger LOGGER = LoggerFactory.getLogger(SCLExpressionIssueProvider.class); private boolean disposed = false; private ComponentSyncListenerAdapter listener;