jtulach commented on PR #7659:
URL: https://github.com/apache/netbeans/pull/7659#issuecomment-2282882099

   The problem with `HintsController.setErrors` is that it is _not 
declarative_. It is _push at random_ approach. There is no way to detect any 
registration in a layer or lookup to find out if the `setErrors` call will 
happen or not. I guess I made a mistake when this API got in. But it is in and 
we have to live with it.
   
   > I don't think this is the right approach.
   
   I'd like to know what others think then. I can try to implement various 
solutions, but the core problem remains the same: 
   - _"identify whether an ErrorProvider has been written before or after"_ of 
#7579 (that's what this PR does)
   - or make an incompatible change and fix as many [misbehaving cases as 
reported](https://github.com/apache/netbeans/issues/7647#issuecomment-2276098200)
 (I can do that as well)
   
   > you want to be able to expose the enso functionality quickly, ...  
CompletionProvider and implement a Hint provider in Enso module itself (or in a 
bridge-module).
   
   That's a misunderstanding. If I wanted to expose Enso functionality in 
NetBeans, I would do what you suggest. But I am (a NetBeans) architect. I don't 
want people (not me!) to write the same code twice. I want them to provide a 
single SPI implementation that works in both NetBeans IDE and VSCode. As #7579 
demonstrated the `ErrorProvider` is the (sufficient enough) SPI to achieve 
that. All we need to do is to find out whether the _delegation should be used 
or not_.
   
   > I can imagine a GUI tool, that is run headful, but wants to provide an 
LSP. It is totally intransparent
   
   People can usually imagine a lot of weird usecases (I used to be good at 
that when I was the architect). However for our purposes, we have just three:
   - NetBeans IDE
   - Apache NetBeans VSCode extension
   - some NetBeans based application
   
   The `isGraphicalEnvironment` is a good check for all these cases. The 
**check is already used at various places**, but I can certainly replace it 
with something different. An _explicit system property_ or a _check for a 
module present only in VSCode extension_ come to my mind. What's your preferred 
choice, if any?
   
   I can also just fix the `GsfLanguage` cases and wait for another report, if 
that's your preferred choice.


-- 
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