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 95983 - API review for includes/excludes
Summary: API review for includes/excludes
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: apireviews
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 49026
  Show dependency tree
 
Reported: 2007-02-20 02:05 UTC by Jesse Glick
Modified: 2007-03-02 03:36 UTC (History)
1 user (show)

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 Jesse Glick 2007-02-20 02:05:05 UTC
I would like to ask for an API review for issue #49026.

http://wiki.netbeans.org/wiki/view/Excludes49026

has all the relevant information.

http://wiki.netbeans.org/wiki/view/Excludes49026#section-Excludes49026-APIChangesSoFar

lists the proposed API changes.
Comment 1 Jesse Glick 2007-02-26 23:38:18 UTC
No comments? I would like to merge this.
Comment 2 Milos Kleint 2007-02-28 17:56:49 UTC
looks generally ok.

mk1: exclude of project's binary dependencies is probably also for consideration
for maven based projects, be it netbeans dependencies, OSGI or anything else
that restricts access to packages.

mk2: are excludes meant for sources only or for test sources as well? would they
be different then? the current costumizer dialog seems to cater to that scenario

mk3: will there be any error reporting on wrongly setup pattern (illegal
character used etc.) probably not necessary, user wil be notified by the missing
includes that something is wrong.
Comment 3 Milos Kleint 2007-02-28 18:03:26 UTC
"... seems to cater ..." -> "... seems not to cater ..."
Comment 4 Jesse Glick 2007-03-01 04:42:41 UTC
[MK1] Excludes in binary classpath entries is permitted by the API but ignored
by Retouche, and also not an option in any of the existing project types. If you
would like to use it for Maven projects (and I might like to use it for NBM
projects), that would be a separate development effort, mostly in Retouche code.

[MK2] For the sake of simplicity, excludes in a j2seproject apply to all source
roots including test sources. In a freeform project, the GUI makes the same
assumption but project.xml could specify more specific excludes. The API permits
any policy.

[MK3] No plans for such an error message, since you get instant feedback on
matches anyway. Please note that the current design of IncludeExcludeVisualizer
is provisional - as mentioned in the wiki, a possible alternate view (or perhaps
replacement) would show either a tree with checkboxes, or a pair of list panes
with Add>> and <<Remove buttons, or some similar GUI which is less powerful (no
patterns) but simpler to use when only a limited number of included or excluded
elements are needed.
Comment 5 Jesse Glick 2007-03-01 04:46:10 UTC
By the way, one recent minor refinement to the API requested by Tomas: a
FilteringPathResourceImplementation firing PROP_INCLUDES may choose to set a
propagationId on the PropertyChangeEvent. Consecutive events with matching IDs
are coalesced by ClassPath when refiring its PROP_INCLUDES. This is important
for performance when a project contains n > 1 source roots in one compilation
unit and includes/excludes are changed; otherwise Retouche would need to rescan
n^2 roots (n roots for each of n events received).
Comment 6 Jesse Glick 2007-03-02 03:36:44 UTC
Done. See issue #49026 for commit information.