-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP: Show documentation (ctrl+shift+space) displays incorrect documentation #4494
Comments
Could you please provide an example code to reproduce it? |
You can check on the example of the standard function
|
I have checked on two environments on NetBeans versions starting from 12.6, the same behavior everywhere.
|
I tried to understand the code. netbeans/ide/csl.api/src/org/netbeans/modules/csl/editor/completion/GsfCompletionProvider.java Lines 526 to 573 in f369361
Here we get the ElementHandle for which we want to display the documentation netbeans/ide/csl.api/src/org/netbeans/modules/csl/editor/completion/GsfCompletionProvider.java Line 547 in f369361
Judging by the code, PHPCodeCompletion netbeans/php/php.editor/src/org/netbeans/modules/php/editor/completion/PHPCodeCompletion.java Line 131 in f369361
doesn't use prefix , prefixMatch and queryType.DOCUMENTATION parameters passed to CodeCompletionContext.
And, in the It looks like we need to modify PHPCodeCompletion so that it uses the |
I see the same behaviour as @troizet. However, I regard this as a desirable UI behaviour. It allows the user a lot of flexibility. The displayed list is responsive to user input and allows users to obtain the correct function name simply by typing a few letters, then selecting from the list. It is an excellent didactic tool. It increases my knowledge and understanding of the language. I don't want this feature to change. |
- apache#4494 - Add a new test method for checking documentation when a `QueryType` is `DOCUMENTATION` to `CslTestBase` - If `QueryType` is `DOCUMENTATION`, get a whole identifier as a prefix - Add unit tests
- apache#4494 - Add a new test method for checking documentation when a `QueryType` is `DOCUMENTATION` to `CslTestBase` - If `QueryType` is `DOCUMENTATION`, get a whole identifier as a prefix - Add unit tests
I can reproduce it with an example of the PR. Thanks. |
- apache#4494 - Add a new test method for checking documentation when a `QueryType` is `DOCUMENTATION` to `CslTestBase` - If `QueryType` is `DOCUMENTATION`, get a whole identifier as a prefix - Add unit tests - Increase spec versions
Fix being shown incorrect documentation #4494
Apache NetBeans version
Apache NetBeans 14
What happened
It looks like the documentation search for the display is not done by the full word, but by a few characters before the caret. Also the search is done for partial matches.
How to reproduce
simplescreenrecorder-2022-08-10_22.11.46.mp4
Did this work correctly in an earlier version?
No / Don't know
Operating System
Ubuntu 20.04.4 LTS
JDK
OpenJDK 64-Bit Server VM 11.0.16+8-post-Ubuntu-0ubuntu120.04
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
Same behaviour on Apache NetBeans 15 release candidate 3.
Are you willing to submit a pull request?
No
Code of Conduct
Yes
The text was updated successfully, but these errors were encountered: