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 224536 - Provide extension point to change the project node label - analog to ProjectIconAnnotator
Summary: Provide extension point to change the project node label - analog to ProjectI...
Status: REOPENED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Tomas Stupka
URL:
Keywords: API
Depends on:
Blocks: 194773
  Show dependency tree
 
Reported: 2013-01-06 12:45 UTC by markiewb
Modified: 2016-07-10 19:25 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-01-06 12:45:37 UTC
Please provide an extension point, so that external modules can change the label of a project node. The (html-)label should be editable or even replaceable.

Usecases:
* display the projectgroup where the project is in
* display the projectsuite where the project belongs to [1]
* display the version of the maven project [2]
* display the current SCM-status like changed, modified, new (currently this label modification is hardcoded and could be simplified this way - IMHO the extpoint can be put there)

The icon of a project node can already be modified using the ProjectIconAnnotator - see [1], [3]. 

[1] https://blogs.oracle.com/geertjan/entry/org_netbeans_spi_project_projecticonannotator
[2] http://netbeans.org/bugzilla/show_bug.cgi?id=194773
[3] http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/spi/project/ProjectIconAnnotator.html

FYI: In eclipse this feature is called "icon decorator" (for all types of nodes - i think). There is even an option dialog, where the user can choose which decorator is active.
Comment 1 markiewb 2013-01-06 12:52:50 UTC
FYI: Geertjan described a hack in [4]

[4] https://blogs.oracle.com/geertjan/entry/show_project_path_instead_as
Comment 2 markiewb 2013-01-06 13:14:18 UTC
Another possible usecase:

http://netbeans.org/bugzilla/show_bug.cgi?id=198379
Comment 3 Milos Kleint 2013-03-14 08:08:51 UTC
*if* such api is created, I cannot see how many different decorators can cooperate to provide meaningful label and how and where this would be configurable by the user (one place vs multiple ones)

also please note that currently one can register either a global service or project type based service. it's not clear what the annotators would be, some in your list appear global (project type agnostic) while some others require project type specific insight.

I don't particularly like the ProjectIconAnnotator interface as it's currently only working because of low number of annotators. More would stumble as they all fight for the same 4 icon edges and if some of them dares to replace the icon entirely, he would effectively delete all previous annotators.
Comment 4 markiewb 2013-07-08 22:46:01 UTC
Probably related to https://netbeans.org/bugzilla/show_bug.cgi?id=189472 ?
Comment 5 Martin Balin 2016-07-07 08:37:38 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 6 markiewb 2016-07-10 19:25:04 UTC
Still valid in 8.2 dev 
Product Version: NetBeans IDE Dev (Build 201607100002)