troizet commented on issue #4494:
URL: https://github.com/apache/netbeans/issues/4494#issuecomment-1275617987

   I tried to understand the code. 
   The code that runs to display the documentation
   
https://github.com/apache/netbeans/blob/f369361d1e92f2e04ab2add4bae52147a0acde51/ide/csl.api/src/org/netbeans/modules/csl/editor/completion/GsfCompletionProvider.java#L526-L573
   
   Here we get the ElementHandle for which we want to display the documentation
   
https://github.com/apache/netbeans/blob/f369361d1e92f2e04ab2add4bae52147a0acde51/ide/csl.api/src/org/netbeans/modules/csl/editor/completion/GsfCompletionProvider.java#L547
   
   Judging by the code, PHPCodeCompletion
   
https://github.com/apache/netbeans/blob/f369361d1e92f2e04ab2add4bae52147a0acde51/php/php.editor/src/org/netbeans/modules/php/editor/completion/PHPCodeCompletion.java#L131
   doesn't use prefix, prefixMatch and queryType.DOCUMENTATION parameters 
passed to CodeCompletionContext. 
   
   And, in the `is_numeric` example, where caret is set between `is_nu` and 
`meric()`, instead of using `prefix = is_numberic`, `prefix = is_nu` is used.
   Therefore, instead of a specific ElementHandle for `is_numeric`, 
PHPCodeCompletion returns a list of suggested ElementHandles for `is_nu`.
   In this case,` is_null` and `is_numeric`, where `is_null` is first in the 
list, for which the documentation is displayed
   
   It looks like we need to modify PHPCodeCompletion so that it uses the 
prefix, prefixMatch and queryType.DOCUMENTATION parameters passed to 
CodeCompletionContext.


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