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

[feature request] - dependency tree #161

Closed
fssrepository opened this issue Dec 6, 2018 · 13 comments
Closed

[feature request] - dependency tree #161

fssrepository opened this issue Dec 6, 2018 · 13 comments
Assignees
Labels
discussion feature-request New feature or request
Milestone

Comments

@fssrepository
Copy link

fssrepository commented Dec 6, 2018

There was a nice feature in Eclipse which showed dependency in a Tree (so individually you would be able to expand and collapse), and at the top, there was a filter bar, where you were able to type text in and showed the tree accordingly.

The effective pom simply unreadable. The visual representation like in the case of Netbeans is unusable. Too much info on the screen at the same time and it's slow also.

Can you make a PR on this, pls.? It would be really helpful to see transitive dependencies, which sometimes either on maven or gradle it makes life difficult.

I don't want to reinstall eclipse for that purpose. Another benefit is, that java based environment like NetBeans, especially on Ubuntu, sucks. (scrolling lags)

@Eskibear
Copy link
Member

Eskibear commented Dec 6, 2018

Thanks for your suggestion.

There was a nice feature in Eclipse which showed dependency in a Tree

For the dependency view, you may want to see this extension: https://github.com/Microsoft/vscode-java-dependency

The effective pom simply unreadable

https://github.com/redhat-developer/vscode-xml I think this extension is what you want.

And also I'm working on to show available plugins/goals as mentioned in #126 , and it looks like the following. If you have any suggestion for it, please let me know.
screen shot 2018-12-06 at 1 34 14 pm

@Eskibear
Copy link
Member

Eskibear commented Dec 6, 2018

@fssrepository Personally I suggest you keep an eye on the Java Pack, which provides you latest information of Java related extensions on VSCode.

@fssrepository
Copy link
Author

fssrepository commented Dec 6, 2018

further discussion on #126

@Eskibear
Copy link
Member

Eskibear commented Dec 6, 2018

#126 is for plugin specified goals. If you want to discuss about dependencies, it's better to discuss in vscode-java-dependency.

BTW, I don't see a "tag" in my search bar.

@fssrepository
Copy link
Author

fssrepository commented Dec 6, 2018

@Eskibear pls. look at my attached image (top right corner - you can see a "tag" next to the common three search option) It would be anyway a nice feature to change the tree view accordingly either in the dependency plugin or in the task plugin. To me to include it in a java dependency tree a little bit strange idea. I wouldn't include the maven dependency in java dependency tree or not separate that much the maven tasks from the maven dependency.

You can write dependencies in gradle. I think the two plugins discussion somehow needs to talk about each other's responsibility.

Somebody might come up with better ideas as the interface is a little bit cluttered.

@Eskibear
Copy link
Member

Eskibear commented Dec 7, 2018

The "tag" you mentioned is not implemented in VSCode I think. And if it's a feature request of VSCode's UI change, it shouldn't be discussed here. BTW, personally I don't think adding such a "tag" in the search bar is a good thing.

I think you want to filter the item in the tree view. (Correct me if I'm wrong.) If so, you may want to follow this issue for the tree view filtering support just as the Outline behaves.

@fssrepository
Copy link
Author

fssrepository commented Dec 7, 2018

Thanks, @Eskibar, @Gruntfuggly who has added a comment, made the Todo Tree plugin, you should try that out for inspiration, There are several design features, which would be very handy elsewhere also, where handling trees and the screen has been cluttered. The "tag" image itself has been grabbed from it. It has the same functionality, what I said.

The search bar is a different story, although I wanted to filter in a combination of the text in the tree while changing the tree view itself. (so filter out either classes / tasks / dependencies)

@fssrepository
Copy link
Author

fssrepository commented Dec 10, 2018

Can we introduce a new menu next to the "effective pom" called the dependency tree?
mvn dependency:tree? I have no idea how to open the output in vs code to expand/collapse the generated tree branches, like in the case of javascript/java etc. Any idea on this, which extension i need to add to the generated file (generated in the command line)?

The filter bar can be the search bar (editor panel ctrl+F), so really no additional effort is needed, just somehow the generated file should be opened. So make it simple.

To be honest, I'm developing maven app in the last decade, but never really used effective pom, but many times dependency tree.

@Eskibear
Copy link
Member

@fssrepository As I mentioned in #126 (comment) , I'm thinking of the dependency tree experience. Let's continue the discussion here for consistency.

Can we introduce a new menu next to the "effective pom" called the dependency tree?

The filter bar can be the search bar (editor panel ctrl+F), so really no additional effort is needed, just somehow the generated file should be opened. So make it simple.

Yes we can, and it's simple, I can use mvn dependency:tree -DoutputFile=... to generate the output, and show the content just as what effective-pom does.

I have no idea how to open the output in vs code to expand/collapse the generated tree branches

Me neither. After searching "fold" in the extension marketplace, I don't see a popular which looks good.

To be honest, I'm developing maven app in the last decade, but never really used effective pom, but many times dependency tree.

Thanks for the info, our next step is all around the dependency related features.

Yes it's feasible to simply open the output, but I don't want to do that for the moment. As you know, adding a feature is easy, but removing one is tough, esp. when users are used to it. I prefer showing it in the explorer, next to the "Plugins", and providing searching support. Any further suggestion about this?

BTW, for now, a workaround for you is to use custom goals..., type "dependency:tree -DoutputFile=./deps.txt", and open the file.

@Eskibear Eskibear self-assigned this Dec 11, 2018
@Eskibear Eskibear added feature-request New feature or request discussion labels Dec 11, 2018
@Eskibear Eskibear added this to the backlog milestone Dec 11, 2018
@Eskibear
Copy link
Member

Dependency tree feature has been added since 0.16.0, please give it a try. Now it simply execute "dependency:tree" and open the output as a new document in VS Code. The expand/collapse UX now leverages VS Code's native "fold by indentation" . Future UI improvement should be tracked in #261

@panzippd
Copy link

panzippd commented May 26, 2020

The Dependency tree could view like IntelliJ? and it's useful in resolving dependency conflicts.
image

@Eskibear
Copy link
Member

@panzippd
As far as I know, technically vscode's API is able to support such visualization (e.g. webview API), but it's not prioritiezed and we haven't done any investigation on implemention details yet.

As I mentioned above, we have #261 to track it. If you want to contribute, or have any useful information to share, you are welcomed to join our discussion in #261 .

@ShihanMeng618
Copy link
Contributor

hi, @fssrepository

Since 0.32.0, the dependency tree has been visualized in maven explorer. See #261 (comment). And you are able to expand and collapse dependencies now.

and @panzippd, we provide two methods to resolve conflict, one is to exclude the dependency (demo) and the other is to set the version (demo). Maybe you can give it a try.

Feedbacks, suggestions, and feature requests are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants