Bug 135399 - Automatically badge project root nodes according to VCS status of contained files
Automatically badge project root nodes according to VCS status of contained f...
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Generic Infrastructure
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Jesse Glick
issues@projects
: API, API_REVIEW_FAST
Depends on: 145682
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-20 10:24 UTC by Jan Lahoda
Modified: 2008-09-09 22:28 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Proposed API change patch for main repo (14.12 KB, patch)
2008-06-03 02:29 UTC, Jesse Glick
Details | Diff
Corresponding patch for contrib (1.81 KB, patch)
2008-06-03 02:33 UTC, Jesse Glick
Details | Diff
Patch for main updated to include groovy.grailsproject (14.72 KB, patch)
2008-06-03 02:35 UTC, Jesse Glick
Details | Diff
In case somebody wants to badge the "lazy" projects, here is a patch (2.21 KB, patch)
2008-09-09 13:44 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2008-05-20 10:24:40 UTC
This is regarding this commit:
http://hg.netbeans.org/main/contrib/rev/6f25772186e8
"Badge project root nodes acc. to filesystem status automatically."

Is this meant as a general contract on which the project types are allowed to depends? If yes, shouldn't:
1) be the contract documented?
2) the spec versions&dependencies adjusted in such a way that the updated project types will require the new behavior?
(In order to prevent regressions when a new version of project type is used against the old version of projectui.)
3) tests exist to ensure the behavior will not regress?
4) be the contract reviewed through the API review process?
Comment 1 Jesse Glick 2008-05-23 17:55:15 UTC
I do plan to deal with this shortly, just have not had a moment yet...
Comment 2 Jesse Glick 2008-05-30 20:52:53 UTC
The changeset you linked to is unrelated. I think you meant to link to

http://hg.netbeans.org/main/rev/585ba313709f
http://hg.netbeans.org/main/contrib/rev/23d0944fb6b7
Comment 3 Jan Lahoda 2008-05-30 20:59:19 UTC
Yes. Sorry.
Comment 4 Jesse Glick 2008-06-02 21:52:08 UTC
Test written in

http://hg.netbeans.org/core-main/rev/4029ae2c6a38
Comment 5 Jesse Glick 2008-06-03 02:29:58 UTC
Created attachment 62294 [details]
Proposed API change patch for main repo
Comment 6 Jesse Glick 2008-06-03 02:33:39 UTC
Created attachment 62295 [details]
Corresponding patch for contrib
Comment 7 Jesse Glick 2008-06-03 02:35:40 UTC
Created attachment 62296 [details]
Patch for main updated to include groovy.grailsproject
Comment 8 Jesse Glick 2008-06-03 02:46:21 UTC
Please comment on the change in behavior of the Projects tab referred to here: project root nodes will be automatically
badged according to the VCS status of files contained in the project. This may be considered an API change to the extent
that project types formerly implemented this logic for themselves but no longer need to. The specification version and
dependency increment ensures that new project types cannot be mixed with the old Projects tab - this would result in
loss of root node badging, which would be a minor bug.

Note that the Projects tab already performed display name badging (if the VCS requested it), just not icon badging. (It
also marked the main project bold and performing some other standard enhancements of the root node, such as adding
SearchInfo.) The change consolidates the badging logic in one place, relieving project types of the burden of
implementing this for themselves (with substantial code duplication), as well as fixing some subtle problems that were
previously addressed in only some project types.

Other subnodes may still need to be explicitly badged if they somehow display files. The new behavior does not attempt
to provide a convenience API for implementing such logic, though it could be useful as a future enhancement. (Java
package root nodes do this automatically, as does FolderNode, but special nodes such as "Important Files" need custom
logic.)
Comment 9 Jesse Glick 2008-06-09 20:06:11 UTC
#78e1be465fab for core-main. I will wait to apply it for contrib until the former gets pushed into main.
Comment 10 Jesse Glick 2008-06-10 01:42:33 UTC
contrib #9e2a9599cfb4
Comment 11 Quality Engineering 2008-09-06 17:36:25 UTC
Integrated into 'main-golden', will be available in build *200809061401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0d6f5c004230
User: Jesse Glick <jglick@netbeans.org>
Log: #145682: refine fix of #135399 to account for lazy projects.
Comment 12 Jaroslav Tulach 2008-09-09 13:44:03 UTC
Created attachment 69401 [details]
In case somebody wants to badge the "lazy" projects, here is a patch
Comment 13 Jesse Glick 2008-09-09 22:28:00 UTC
I think adding the wait icon as in your patch would be a good idea.

(BTW the second hunk in the patch is bogus.)


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