Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 217106 - Patch for: Maven dependency graph visual indication - show icon for open projects
Patch for: Maven dependency graph visual indication - show icon for open proj...
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Maven
7.3
PC Windows 7
: P3 (vote)
: 8.0
Assigned To: Tomas Stupka
issues@projects
: PATCH_AVAILABLE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-20 14:22 UTC by mienamoo
Modified: 2014-07-19 10:19 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Proposed patch (4.70 KB, patch)
2013-06-10 22:45 UTC, markiewb
Details | Diff
Patch in action (40.09 KB, image/png)
2013-06-10 22:47 UTC, markiewb
Details
Proposed patch v2 (7.03 KB, patch)
2013-06-11 21:50 UTC, markiewb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mienamoo 2012-08-20 14:22:36 UTC
I noticed that the currently open pom.xml and its direct dependencies are indicated via shading on the dependency graph. And that is useful indeed. So that gave me this idea. Would it be possible to also indicate the currently open projects visually somehow?
Comment 1 markiewb 2013-05-28 18:06:06 UTC
It would be also useful, that you can jump to the project when you doubleclick on such a node.
Comment 2 markiewb 2013-06-10 22:45:18 UTC
Created attachment 135609 [details]
Proposed patch

I like to propose a patch to solve this issue. The patch adds project icons for open project to the ArtifactWidget. See screenshot. I had to add a dependency to projectuiapi to get the open projects. I am not sure if I used the most efficient way to get the project icon.

Please review, rewrite and commit if appropriate.
Comment 3 markiewb 2013-06-10 22:47:32 UTC
Created attachment 135610 [details]
Patch in action
Comment 4 Milos Kleint 2013-06-11 07:25:24 UTC
ideally the map of artifact/file to open project icon would be calculated just once and not repeatedly for each widget. with 100 projects opened and 200 nodes in graph, the calculation is too costly in AWT (as we already have severe problems with layouting)
Comment 5 markiewb 2013-06-11 21:50:06 UTC
Created attachment 135659 [details]
Proposed patch v2

@Milos: Please review the updated patch! When creating the scene the icons are gathered once and hold within a map.
Comment 6 markiewb 2013-06-11 22:47:50 UTC
(In reply to comment #5)
> Created attachment 135659 [details]
> Proposed patch v2
> 
> @Milos: Please review the updated patch! When creating the scene the icons are
> gathered once and hold within a map.

@Milos: Another thing which made me think of. In the patch v2 the icons are looked up via "projectIcons.get(artifact)". This won't work when there is a pom.xml (A) with packaging 'ejb' and a pom.xml (B) depends on (A) without defining the type tag 'ejb'. Is this a valid scenario?
Comment 7 Tomas Stupka 2014-07-08 15:29:19 UTC
thanks for the patch. i will apply v2, it seems to work fine.

> @Milos: Another thing which made me think of. In the patch v2 the icons are looked up via "projectIcons.get(artifact)". 
> This won't work when there is a pom.xml (A) with packaging 'ejb' and a pom.xml (B) depends on (A) without defining the type tag 'ejb'. Is this a valid scenario?
speaking for myself - not sure if it is. Let's deal with it in case it appears as a problem ...
Comment 8 Tomas Stupka 2014-07-09 09:30:40 UTC
fixed in core-main #aa789c82dad3
Comment 9 Quality Engineering 2014-07-19 10:19:55 UTC
Integrated into 'main-silver', will be available in build *201407190718* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/aa789c82dad3
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #217106 - Patch for: Maven dependency graph visual indication - show icon for open projects


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