matthiasblaesing commented on code in PR #7579:
URL: https://github.com/apache/netbeans/pull/7579#discussion_r1683326766


##########
java/java.hints/src/org/netbeans/modules/java/hints/infrastructure/JavaErrorProvider.java:
##########
@@ -94,7 +95,9 @@ public class JavaErrorProvider implements ErrorProvider {
     @Override
     public List<? extends Diagnostic> computeErrors(Context context) {
         List<Diagnostic> result = new ArrayList<>();
-
+        if (!GraphicsEnvironment.isHeadless()) {

Review Comment:
    This gives me bad vibes and is only a partial solution. I placed a 
breakpoint in `ErrorProviderBridge#run` and I see three `ErrorProvider` there:
   
   1. `org.netbeans.modules.java.hints.infrastructure.JavaErrorProvider`
   2. `org.netbeans.modules.editor.hints.lsp.HintsDiagnosticsProvider`
   3. `org.netbeans.modules.micronaut.symbol.MicronautSymbolErrorProvider`
   
   (1) is now handled by checking `GraphicsEnvironment#isHeadless`, (2) ist 
explicitly filtered out by its name, (3) is retained.
   
   This will become whac-a-mole because the interaction are not obvious. Would 
a different approach make sense where an autoloaded helper module, that depends 
on the modules, that provides the LSP implementation, provides the bridge only 
for that module? That way the interaction is easier to see and if necessary 
easy to drop. 
   
   I don't know the enso module name but assuming it is `enso-lsp`, a module 
`enso-lsp.nb` could be used to provide the integration limited to the enso type.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to