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 169031

Summary: Indicate that NetBeans project is a part of the Kenai project in the Projects view
Product: connecteddeveloper Reporter: Petr Dvorak <joshis>
Component: Team FrameworkAssignee: Jan Becicka <jbecicka>
Status: RESOLVED FIXED    
Severity: blocker CC: jlahoda, jtulach, mmirilovic, olangr
Priority: P2 Keywords: PLAN
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 171516    
Bug Blocks:    
Attachments: indication that NB project is a part of Kenai project - v1
version 2
patch
badge icon
cursor over project node
cursor over src node - the tooltip still present
cursor over package
cursor over single file
Try to build on this.

Description Petr Dvorak 2009-07-23 12:24:54 UTC
Currently, there is no indication about the fact that a NB project is a part of a Kenai project and that some more
features (issues, chat, ...) are thus available.

There could be a badge+navigation button, for example, or a special node under the NB project with Kenai actions on
popup menu...
Comment 1 Petr Dvorak 2009-07-23 13:21:50 UTC
(Maybe there could be a Team menu in the popup menu of a NB project in case that project is a Kenai projecs, but this
would make VCS less accessible, IMO...)
Comment 2 Jan Becicka 2009-08-06 07:42:29 UTC
Ondro, please provide spec. for this. Thanks
Comment 3 Ondrej Langr 2009-08-10 15:15:38 UTC
Created attachment 86048 [details]
indication that NB project is a part of Kenai project - v1
Comment 4 Ondrej Langr 2009-08-10 15:16:21 UTC
Honzo, is the attached screenshot sufficient as a UI spec, or do you need anything else? 
Comment 5 Jan Becicka 2009-08-10 15:50:14 UTC
It looks good, but I'm afraid not doable. Let's wait for Milan's comment.
Comment 6 Petr Dvorak 2009-08-14 15:31:29 UTC
> ... no indication about the fact that a NB project is a part of a Kenai project...

This is partially achieved by the Kenai popup menu on the NB project. I will discuss the proposed UI specs with Milan
when he is back from holidays.
Comment 7 Petr Dvorak 2009-08-18 13:27:55 UTC
Hi Ondra,

we have discussed the UI with Milan and Tomas Holy but unfortunately, the link in the Projects node is not easily
doable:(... We need some different kind of indication...

Currently, if a project is hosted on Kenai.com, there is a possibility to open corresponding Kenai project using the
pupup menu. Maybe an indication (text, not link, for example) would be sufficient in the project node... ?
Comment 8 Ondrej Langr 2009-08-19 11:39:00 UTC
Hi Petr, 
can we get there the graphics without the link? Possibly with a different font color? 
Comment 9 Ondrej Langr 2009-08-21 15:11:57 UTC
I mean something like this... 
Comment 10 Ondrej Langr 2009-08-21 15:12:28 UTC
Created attachment 86529 [details]
version 2
Comment 11 Petr Dvorak 2009-09-03 08:51:16 UTC
OK, I think there is a problem with the implementation and I am sorry to say this - I don't know how to implement this...

Currently, there is no API that can provide a badge to an arbitrary project type (it is not the situation when project
type has it's own node with own icon...). I tried to workaround this the same way as VCS does, but it does not work
either. I found the correct fileobject and I properly annotated it - I can see a badge by the project folder in Files
and Favorites views. However, a Project view uses different strategy for annotating itself - it seems that it inherits
annotations of its subchilds (this is my guess at the moment).
Comment 12 Petr Dvorak 2009-09-03 18:14:11 UTC
According to Marians (adding on CC) suggestion, I tried to add a tooltip to the icon. The result is on the screenshots
below. However, I think that someone more experienced should review the patch, as:

- it uses non-API module "Master Filesystem" ("Kenai UI" must be added as a friend) => Jarda on CC
- if I messed up something, I will interfere with other annotation providers and it will break either all project icons
(totally - projects will have the plain file icons in the projects view), or for example error badges for Java files =>
adding Honza on CC, as he has some experience with this...
Comment 13 Petr Dvorak 2009-09-03 18:14:37 UTC
Created attachment 87073 [details]
patch
Comment 14 Petr Dvorak 2009-09-03 18:21:33 UTC
Created attachment 87076 [details]
badge icon
Comment 15 Petr Dvorak 2009-09-03 18:25:53 UTC
Created attachment 87078 [details]
cursor over project node
Comment 16 Petr Dvorak 2009-09-03 18:26:28 UTC
Created attachment 87079 [details]
cursor over src node - the tooltip still present
Comment 17 Petr Dvorak 2009-09-03 18:27:00 UTC
Created attachment 87080 [details]
cursor over package
Comment 18 Petr Dvorak 2009-09-03 18:27:28 UTC
Created attachment 87081 [details]
cursor over single file
Comment 19 Petr Dvorak 2009-09-03 18:28:05 UTC
Adding Jarda and Honza for consulting the issue...
Comment 20 Jan Lahoda 2009-09-04 08:12:36 UTC
Please be careful about performance: annotateIcon runs in AWT Thread, and methods like ProjectManager.findProject can
block for a while. Take a look at ErrorAnnotator in java.source that offloads the computation outside AWT and caches the
results. Not sure what elements (projects, source groups) should be annotated, but the current code will not annotate
e.g. external source groups, I think.

Nitpicking: ignoring caught exceptions is almost never correct, if they are not important, log them with FINE(R/ST)
level. You might want to create a method to perform the needed tests, to prevent code duplication.
Comment 21 Petr Dvorak 2009-09-04 09:06:58 UTC
> Not sure what elements (projects, source groups) should be annotated

Well, if it was possible, only project nodes should be annotated. The problem is that when I annotate the correct
fileobject, the annotations are visible in Files/Favorites but not in Projects. This is why I annotate direct subfolders
too (the annotation of a project node is taken from these... and this is btw the reason for code duplication - to make
it work quickly...).

Thank you Honza, I will have a look at the rest of your suggestions too... 
Comment 22 Jaroslav Tulach 2009-09-04 10:13:01 UTC
Using masterfs (friend!) API to annotate icon of a project is quite devastating waste of resources. To do a single 
local thing, you basically slowdown visualization of every FileObject. It would be much more easier and effective to 
define org.netbeans.spi.project.ui.ProjectAnnotator { Image annotateIcon(Project p, Image img); }

In any case you need to pass API review before integrating.

Comment 23 Jaroslav Tulach 2009-09-04 10:14:07 UTC
Created attachment 87095 [details]
Try to build on this.
Comment 24 Jan Lahoda 2009-09-04 10:47:08 UTC
If only projects nodes should be annotated, then I agree with Jarda that ProjectAnnotator would be the best solution.
Comment 25 Jan Becicka 2010-06-25 15:29:10 UTC
fixed in 3dc62676f679
Comment 26 Quality Engineering 2010-06-26 03:39:01 UTC
Integrated into 'main-golden', will be available in build *201006260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3dc62676f679
User: Jan Becicka <jbecicka@netbeans.org>
Log: Issue #169031 - Indicate that NetBeans project is a part of the Kenai project in the Projects view