From dca20c7c10ae30a7ea50a22e15a043dc8d71af1b Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Thu, 17 Feb 2022 09:09:29 +0200 Subject: [PATCH] Disable SCL Issue provider by default Use org.simantics.scl.issues=true system property to get it back. gitlab #806 Change-Id: I93170cad18959e1c51d2832d725c9794190bb246 --- .../scl/issue/SCLExpressionIssueProvider.java | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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; -- 2.47.1