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.
Summary: | Indicate that NetBeans project is a part of the Kenai project in the Projects view | ||
---|---|---|---|
Product: | connecteddeveloper | Reporter: | Petr Dvorak <joshis> |
Component: | Team Framework | Assignee: | 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
(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...) Ondro, please provide spec. for this. Thanks Created attachment 86048 [details]
indication that NB project is a part of Kenai project - v1
Honzo, is the attached screenshot sufficient as a UI spec, or do you need anything else? It looks good, but I'm afraid not doable. Let's wait for Milan's comment. > ... 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.
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... ? Hi Petr, can we get there the graphics without the link? Possibly with a different font color? I mean something like this... Created attachment 86529 [details]
version 2
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). 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... Created attachment 87073 [details]
patch
Created attachment 87076 [details]
badge icon
Created attachment 87078 [details]
cursor over project node
Created attachment 87079 [details]
cursor over src node - the tooltip still present
Created attachment 87080 [details]
cursor over package
Created attachment 87081 [details]
cursor over single file
Adding Jarda and Honza for consulting the issue... 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. > 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...
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. Created attachment 87095 [details]
Try to build on this.
If only projects nodes should be annotated, then I agree with Jarda that ProjectAnnotator would be the best solution. fixed in 3dc62676f679 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 |