This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 217106

Summary: Patch for: Maven dependency graph visual indication - show icon for open projects
Product: projects Reporter: mienamoo
Component: MavenAssignee: Tomas Stupka <tstupka>
Status: RESOLVED FIXED    
Severity: normal CC: markiewb
Priority: P3 Keywords: PATCH_AVAILABLE
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Proposed patch
Patch in action
Proposed patch v2

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