feat: Support Basic Auto Completion#971
Conversation
c793632 to
6d2ca14
Compare
abae73d to
85eefed
Compare
|
in the screenshot above, when selecting |
It's a bug. Just try in IntelliJ and find it's behavior:
I'd like to change to this in the next commit. |
| implementation "org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.12.0" | ||
| implementation "org.codehaus.groovy:groovy-eclipse-batch:3.0.8-01" | ||
| implementation "com.google.code.gson:gson:2.8.7" | ||
| implementation "org.apache.bcel:bcel:6.5.0" |
There was a problem hiding this comment.
if it's shipped together, you should update thirdpartynotice
There was a problem hiding this comment.
should we update the thirdpartynotice for other dependencies?
| return text.substring(0, position.getCharacter() - start.getCharacter()); | ||
| } | ||
|
|
||
| public static void applySetting(GradleServices services, Object settings) { |
There was a problem hiding this comment.
applySetting anything to do with LSP?
There was a problem hiding this comment.
The setting values are converted from LSP Json objects. Maybe something like GradleServivesUtils is a better place for this method?
There was a problem hiding this comment.
to me, LSPUtils should host utilities like converting between LSP objects and other data structures.
There was a problem hiding this comment.
can it be a public member of class GradleServices?
There was a problem hiding this comment.
can it be a public member of class
GradleServices?
Sure.
| this.applySetting(this, settings); | ||
| } | ||
|
|
||
| public void applySetting(GradleServices services, Object settings) { |
There was a problem hiding this comment.
why do you need to pass a GradleService? Can it be public void applySetting(Object settings) ?
* feat: Initialize Language Server (#959) * feat: Support compiling and pushing diagnostics (#962) * feat: Support basic groovy syntax highlighting (#960) * feat: Support semantic highlighting (#967) * feat: Support document outline (#969) * feat: Support auto completion in dependencies closure (#970) * feat: Support Basic Auto Completion (#971) * fix: Add null check for visitors (#974) * feat: Show symbol detail for method calls (#973) * chore: Prepare for 3.8.0 (#978) * fix: Use padding to correct version order (#986) * fix: Dependency completion doesn't work when multiple dependencies closures exist (#984) * fix: Correct version completion kind (#985) * fix: Handle multiple content changes (#992) * feat: Support completion for settings.gradle (#988) * fix: Offer completion results from supertypes (#987) * feat: Provide dependencies content in outline (#998) * feat: Support basic java plugin aware (#989) * feat: Support basic tasks and dependencies (#1002) * chore: Add thirdpartynotice * chore: Fix ci
Parts of #956

This PR try to get local gradle library file via the current vscode-java settings, and parse the gradle library file to get the content.
For method calls, we'll calculate call the method calls from the root to the inner calls, and use "org.gradle.api.Project" to match them one by one, for the final calls, we get the related Gradle Library and offer the completion results.