Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support dependency view #887

Merged
merged 3 commits into from
Aug 17, 2021
Merged

Conversation

CsCherrYY
Copy link
Collaborator

@CsCherrYY CsCherrYY commented Jul 28, 2021

Depends on #888

This work is still in progress. Here to collect comments and feedbacks.
cc: @testforstephen @Eskibear @jdneo

Here we just use a gradle plugin (see #888 ) to get the project dependencies and register a request GetDependenciesRequest to get them, in the client side, we just show dependencies and tasks in the same view and group them.

Note: I didn't change the view id gradleTasksView in this PR since it would bring a lot of changes in test and other components.

@CsCherrYY CsCherrYY marked this pull request as ready for review July 28, 2021 09:20
@CsCherrYY CsCherrYY requested a review from badsyntax as a code owner July 28, 2021 09:20
proto/gradle.proto Outdated Show resolved Hide resolved
extension/package.json Outdated Show resolved Hide resolved
this.statusBarItem.text = '$(warning) Gradle: Build Error';
this.statusBarItem.show();
} finally {
process.nextTick(() =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the nextTick trick for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I just follow the logics from getBuild, and I'll consider about whether we really need it again.

@CsCherrYY
Copy link
Collaborator Author

CsCherrYY commented Aug 3, 2021

There are still some known issues about this feature:

I'll address these issues by a new commit after #888 got merged.

@CsCherrYY CsCherrYY added the enhancement New feature or request label Aug 3, 2021
@@ -235,7 +235,6 @@ describe(getSuiteName('Gradle tasks'), () => {
groupItem.label,
mockTaskDefinition1ForFolder1.group
);
assert.strictEqual(groupItem.iconPath, vscode.ThemeIcon.Folder);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we changed the themeicon in https://github.com/microsoft/vscode-gradle/pull/887/files#diff-183471d1a24e3c81ad33c4c977c62b13d94770466ca974bb60b5efcf3d6778d2 , IMO there is no way to check the icon so I simply remove it.

return projectItem;
}

export function protocolItem2DependencyConfigurationTreeItem(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why export? I don't find any other caller.

Copy link
Collaborator Author

@CsCherrYY CsCherrYY Aug 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove these redundant exports.

return configurationItem;
}

export function protocolItem2DependencyTreeItem(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why export? I don't find any other caller.

Copy link
Member

@Eskibear Eskibear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall

@CsCherrYY CsCherrYY merged commit a3df074 into microsoft:main Aug 17, 2021
@CsCherrYY CsCherrYY deleted the cs-dependency-view branch August 17, 2021 05:00
@CsCherrYY CsCherrYY added this to the 3.7.0 milestone Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants