Closed troizet closed 1 month ago
This bug seems to have appeared in PR #7579.
@troizet your analysis is spot on. The problem as I see it is, that #7579 removed the default registration of JavaErrorProvider
in NetBeans IDE and registers it only in NetBeans VSCode. But that fix is incomplete, as the NB Codebase holds other ErrorProvider
implementations, that need to be removed also. A quick grep hints:
enterprise/micronaut/src/org/netbeans/modules/micronaut/symbol/MicronautSymbolErrorProvider.java:
enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/VulnerabilityWorker.java
extide/gradle.editor/src/org/netbeans/modules/gradle/editor/hints/LspErrorProvider.java
ide/spi.editor.hints/src/org/netbeans/modules/editor/hints/lsp/HintsDiagnosticsProvider.java
ide/csl.api/src/org/netbeans/modules/csl/hints/GsfErrorProvider.java
java/maven.hints/src/org/netbeans/modules/maven/hints/pom/LspMavenErrorProvider.java
java/java.hints.declarative/src/org/netbeans/modules/java/hints/declarative/idebinding/HintsErrorProvider.java
java/java.hints/src/org/netbeans/modules/java/hints/infrastructure/JavaErrorProvider.java
Some of these are covered, but they need to be checked.
For PHP the errors flow through the GsfErrorProvider
.
@jtulach can you provide a fix?
Thank you for the report. I'll take a look over the weekend and see how to eliminate the duplicated hints for PHP & co.
CCing @jlahoda, @ppisl, @dbalek..
@troizet your analysis is spot on. The problem as I see it is, that #7579 removed the default registration of
JavaErrorProvider
in NetBeans IDE and registers it only in NetBeans VSCode. But that fix is incomplete, as the NB Codebase holds otherErrorProvider
implementations, that need to be removed also. ... Some of these are covered, but they need to be checked.For PHP the errors flow through the
GsfErrorProvider
.
Yes, the flow goes thru GsfErrorProvider
. The PHPLanguage
uses @LanguageRegistration(mimeType=PHP_MIME_TYPE...)
registration which registers ErrorProvider
as well as a Gsf own implementation that fills the HintsCollector.setErrors
.
I somehow need to find out in the ErrorProviderBridge
that the delegation shouldn't happen. If we want to do it in really compatible way, then:
@jtulach can you provide a fix?
the PR in question got reverted and the change is merged to delivery.
Would be good if someone could verify that everything is ok again once NB 23 rc3 is built and close this issue. Github often forgets about issues if PRs aren't merged to master in the most direct way and leaves them open.
Would be good if someone could verify that everything is ok again once NB 23 rc3 is built and close this issue.
Tried NB 23 rc3. No duplicate text in the hint.
Apache NetBeans version
Apache NetBeans 23 release candidate
What happened
Duplicate text in hint tooltip:
PHP examples:
JS example:
Language / Project Type / NetBeans Component
PHP, JavaScript
How to reproduce
Did this work correctly in an earlier version?
Apache NetBeans 22
Operating System
Ubuntu 22.04.4 LTS
JDK
17.0.11; OpenJDK 64-Bit Server VM 17.0.11+9-Ubuntu-122.04.1
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
No