feat: Support compiling and pushing diagnostics#962
Merged
CsCherrYY merged 3 commits intocs-authoring-branchfrom Aug 31, 2021
Merged
feat: Support compiling and pushing diagnostics#962CsCherrYY merged 3 commits intocs-authoring-branchfrom
CsCherrYY merged 3 commits intocs-authoring-branchfrom
Conversation
7 tasks
Member
It looks fine based on your findings above. Besides CPU time, please also keep an eye on memory, and GC. |
Eskibear
reviewed
Aug 31, 2021
| import org.eclipse.lsp4j.Position; | ||
| import org.eclipse.lsp4j.Range; | ||
|
|
||
| public class GradleUtils { |
Member
There was a problem hiding this comment.
About the class name, suggest to move all conversion between LSP item and java element to something like "LSPUtils".
Eskibear
reviewed
Aug 31, 2021
| import org.eclipse.lsp4j.Range; | ||
|
|
||
| public class GradleUtils { | ||
| public static Range getExpressionLSPRange(SyntaxException exp) { |
Member
There was a problem hiding this comment.
Range toRange(SyntaxException exp) should be simple and enough, if it's callled by LSPUtils.toRange(exp)
CsCherrYY
added a commit
that referenced
this pull request
Sep 6, 2021
CsCherrYY
added a commit
that referenced
this pull request
Sep 23, 2021
CsCherrYY
added a commit
that referenced
this pull request
Sep 26, 2021
* 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
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.
Part of #956
One concern here is to reconstruct a new
CompilationUnitonce the text changes. Currently I can't find a proper way to support reuseCompilationUnitby changing it'sSourceUnit, and there is no API found. Just test an extreme case on a Gradle file with more than 1000+ lines, writing a Gradle Closure, and the compile time is acceptable.Just search in GitHub and find the following results (Aug.31 2021):

example:
result:
Constant condition:
language:Gradle filename:build.gradle extension:gradleMy test Gradle file has about 1000 lines and the size is about 35KB. So I think the result can cover most case of gradle files.
(This record is just a reference and recorded in my feature branch with semantic highlighting, completion and documentSymbol on, just to show the percentage of compiling)