Improve the signature help#2039
Merged
jdneo merged 1 commit intoeclipse-jdtls:masterfrom Apr 24, 2022
Merged
Conversation
jdneo
commented
Mar 29, 2022
| SignatureHelp help = getSignatureHelp(cu, 3, 26); | ||
| assertNotNull(help); | ||
| assertEquals(5, help.getSignatures().size()); | ||
| assertEquals(4, help.getSignatures().size()); |
Contributor
Author
There was a problem hiding this comment.
Changed from 5 to 4 because one of the RuntimeException's constructor is not accessible actually.
14 tasks
- Check if we can find a method-like node with the trigger offset, which might be: ClassInstanceCreation, ConstructorInvocation, SuperConstructorInvocation, MethodInvocation, SuperMethodInvocation and MethodRef. - If no method-like node is found, fallback to the previous implementation. - If a method-like node, we leverage that node to provide more context, especially range information to provide signature help. Signed-off-by: sheche <sheche@microsoft.com>
110e661 to
82ad065
Compare
snjeza
approved these changes
Apr 21, 2022
Contributor
|
Thanks for having a look @snjeza . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #2025
The PR works in the following steps:
ClassInstanceCreation,ConstructorInvocation,SuperConstructorInvocation,MethodInvocation,SuperMethodInvocationandMethodRef.SignatureHelpUtils.java)It fixes the following cases:
1. Can trigger at the method name (as a feature to quickly peek all the overrides of a method)
2. Strings containing
()and,3. varargs method
4. complex arguments
5. default constructor
6. consturutor invocation
7. super constructor invocation
8. super method invocation
9. diamond signs
Signed-off-by: sheche sheche@microsoft.com