feat: Support basic tasks and dependencies#1002
feat: Support basic tasks and dependencies#1002CsCherrYY merged 2 commits intocs-authoring-branchfrom
Conversation
fe252bc to
341db40
Compare
618cc7a to
082e3d7
Compare
e6debfb to
f025956
Compare
f025956 to
e8e294f
Compare
extension/package.json
Outdated
| }, | ||
| { | ||
| "id": "gradleDefaultProjectsView", | ||
| "name": "Default Gradle Projects", |
There was a problem hiding this comment.
this name is confusing. On first glance, I feel strange about what is "Default Projects".
There was a problem hiding this comment.
suggest to use the same name, otherwise you will see flickering between "Gradle Projects" and "Default Gradle Projects" when you editing build.gradle
There was a problem hiding this comment.
Agree. Should we use something to indicate the difference between the two views (e.g. description in the project node) or just keep the same view name?
There was a problem hiding this comment.
Do you think it's necessary to let users be aware of two views? I don't think so. Implementing two views is a trick, they actually serve the same purpose and should be regarded as a single view.
|
|
||
| export class DefaultProjectProvider { | ||
| // task name, task group, task description | ||
| private static defaultTaskDefinitions: [string, string, string][] = [ |
There was a problem hiding this comment.
string[][] is hard to maintain, because statement like taskDefinition[1] is hard to understand.
There was a problem hiding this comment.
Here we can use an interface and an array to refactor, making it more readable.
| } else if (element instanceof GroupTreeItem) { | ||
| return element.tasks; | ||
| } | ||
| return []; |
There was a problem hiding this comment.
Is there any difference between [] and undefined ?
There was a problem hiding this comment.
No difference for the appearance. Returning both of them will just show no children. Considering the other implementation of TreeDataProvider in this repository, it's better to keep the return type as vscode.TreeItem[]?
There was a problem hiding this comment.
I just have some impression that it has something to do with collapsedState. Never mind.
* 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
fix #949
Will show basic tasks and dependencies, in case of
Add a new workspace command
gradle.getDependenciesto fetch the literal dependencies from thebuild.gradlein the project root. When importing huge projects, the literal information of dependencies and tasks will provide more information to the user.Here we introduce a new view
gradleDefaultProjectsViewto provide default contents and use a context valuegradle:defaultViewto control which view (default view or common view) to show.