Bug 181517 - Patch for: Display dependencies in a tree rather than a flat list (or graph)
Patch for: Display dependencies in a tree rather than a flat list (or graph)
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Maven
6.x
All All
: P3 (vote)
: 8.0
Assigned To: Milos Kleint
issues@projects
: NETFIX, PATCH_AVAILABLE, UI
: 204681 (view as bug list)
Depends on: 235504
Blocks: 199852
  Show dependency treegraph
 
Reported: 2010-03-04 05:07 UTC by sgtgarcia
Modified: 2013-10-10 13:29 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Proposed patch (6.71 KB, patch)
2013-06-17 16:30 UTC, markiewb
Details | Diff
Patch in action (22.74 KB, image/png)
2013-06-17 16:30 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sgtgarcia 2010-03-04 05:07:29 UTC
The "Show Dependency Graph" is nice (including the "Classpath" view) but less readable than a simple:
mvn dependency:tree

What about displaying this "Dependency Tree" using a JTree or something similar?

Even better: this "Dependency Tree" could be used to display Jars in the "Project" view.
Comment 1 Antonin Nebuzelsky 2010-07-30 15:18:29 UTC
Reassigning to default owner.
Comment 2 Jesse Glick 2011-08-26 19:15:07 UTC
Doing this in the Projects view does not look like it would work well; subnodes of artifacts are already the JAR contents. But I can at least improve indirect dependencies to show their trail, in the tool tip.
Comment 3 Quality Engineering 2011-08-27 14:11:41 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a165889df1d0
User: Jesse Glick <jglick@netbeans.org>
Log: Noted in #181517: display dependency trail (where nontrivial) in a tool tip.
Comment 4 sgtgarcia 2011-09-01 09:25:31 UTC
What about putting the dependency tree in the Artifact Detail view instead of a tooltip?
Comment 5 Jesse Glick 2011-09-01 19:07:17 UTC
The Artifact Detail window is used for artifacts, whereas only dependencies have a trail. (A dependency is an artifact, plus a trail, plus a scope, etc.)
Comment 6 Jesse Glick 2011-11-14 19:28:27 UTC
*** Bug 204681 has been marked as a duplicate of this bug. ***
Comment 7 Jesse Glick 2011-12-30 19:22:20 UTC
Possible NetFIX candidate.
Comment 8 markiewb 2013-06-11 23:06:21 UTC
How about providing some more layouts?

In DependencyGraphScene.cleanLayout() you could use several other layouts.
<pre>
        //Variant a) Hierarchical GraphLayout
        GraphLayout layoutGraph = GraphLayoutFactory.createHierarchicalGraphLayout(this, true, false);
//        layoutGraph.layoutGraph(this);
        
        //Variant b) Tree GraphLayout vertical
        GraphLayout layoutTreeVertical = GraphLayoutFactory.createTreeGraphLayout(10, 10, 50, 50, true);
        GraphLayoutSupport.setTreeGraphLayoutRootNode(layoutTreeVertical, rootNode);
//        layoutTreeVertical.layoutGraph(this);
        
        //Variant c) Tree GraphLayout horizontal
        GraphLayout layoutTreeHorizontal = GraphLayoutFactory.createTreeGraphLayout(10, 10, 50, 50, false);
        GraphLayoutSupport.setTreeGraphLayoutRootNode(layoutTreeHorizontal, rootNode);
//        layoutTreeHorizontal.layoutGraph(this);

        //Variant d) default layout in 7.3 
        layout =  new FruchtermanReingoldLayout(this, panel);
        layout.invokeLayout();
</pre>
Comment 9 markiewb 2013-06-17 16:30:31 UTC
Created attachment 135908 [details]
Proposed patch

I like to propose a patch. The patch introduces popupmenu items which allow the user to switch the used layout algorithm. See screenshot.

@Milos: Please review and commit. (The patch is a candidate for post-NB74)
Comment 10 markiewb 2013-06-17 16:30:47 UTC
Created attachment 135909 [details]
Patch in action
Comment 11 Milos Kleint 2013-09-05 13:31:55 UTC
layouts in graph is related to issue issue 235504
Comment 12 Milos Kleint 2013-10-10 13:29:47 UTC
patch applied with minor finetuning (zoom to fit after changing layout and make all layouts animated)
http://hg.netbeans.org/core-main/rev/aed91faf17d1


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo