]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Disable SCL Issue provider by default 93/4893/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Thu, 17 Feb 2022 07:09:29 +0000 (09:09 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Thu, 17 Feb 2022 07:09:29 +0000 (09:09 +0200)
Use org.simantics.scl.issues=true system property to get it back.

gitlab #806

Change-Id: I93170cad18959e1c51d2832d725c9794190bb246

bundles/org.simantics.modeling/src/org/simantics/modeling/scl/issue/SCLExpressionIssueProvider.java

index 1d04928c840f177d76eaebc3371c780972901b96..ccffb8e775daa086659fd17f8d5a7f9fc9f2fbca 100644 (file)
@@ -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<SCLIssuesTableEntry> getIssues() {
+             return Collections.emptyList();
+        }
+        
+        @Override
+        public void dispose() {
+            
+        }
+    }
+    
     private static final Logger LOGGER = LoggerFactory.getLogger(SCLExpressionIssueProvider.class);
     private boolean disposed = false;
     private ComponentSyncListenerAdapter listener;