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 42540 - Project-sensitive search needs to use Sources, not DataFolder
Summary: Project-sensitive search needs to use Sources, not DataFolder
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Marian Petras
Depends on: 42741
Blocks: 41448
  Show dependency tree
Reported: 2004-04-27 23:10 UTC by Jesse Glick
Modified: 2006-03-24 09:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-04-27 23:10:31 UTC
Mentioned in issue #42293. When fixed, DataFolder
should be removed from the lookup of the
j2seproject logical view root node.

Necessary for proper external source root support,
among other things.

Use GenericSources if the project has no Sources
impl. Use TYPE_GENERIC to get source folders to
search for files generally, or other types (e.g.
TYPE_JAVA) to search just in particular source
folders (e.g. package roots).

The SourceGroup impl should automatically exclude
build products and subprojects; just call
contains(...) to check whether you should search a
file or subdirectory.
Comment 1 Marian Petras 2004-04-28 08:42:45 UTC
Comment 2 Marian Petras 2004-06-01 21:18:56 UTC
Fixed in the trunk.

   - CVS revision 1.6
Comment 3 Jesse Glick 2004-06-02 04:46:40 UTC
Well I removed the project folder from j2seproject's root node's
lookup. But it seems the Find context menu item is disabled. At least
in the case of a project with external sources. Please recheck.
Comment 4 Jesse Glick 2004-06-02 13:32:47 UTC
Jirka confirms it does not work.
Comment 5 Jesse Glick 2004-06-02 13:34:17 UTC
Sorry, wrong Jirka, back to bed. :-O
Comment 6 Marian Petras 2004-06-02 14:24:32 UTC
I confirm that the change you made caused the Find action to be
disabled. But the reason is not that I would use DataFolders (instead
of Sources). The cause is that the mechanism for enabling/disabling
the Find action checks for a DataObject cookie (which is wrong).

I already have a fix for it. I will integrate it tomorrow.
Comment 7 Jesse Glick 2004-06-02 21:36:50 UTC
OK, thanks.
Comment 8 Marian Petras 2004-06-03 11:26:14 UTC
Fixed in the trunk.
Comment 9 Jesse Glick 2004-06-03 22:35:41 UTC
Note that phrebejk accidentally reverted my fix to j2seproject
recently, so until he fixes that, don't bother checking whether this
patch really worked.
Comment 10 Petr Hrebejk 2004-06-05 13:23:26 UTC
Oops. Sorry. Jesse could you be more specific where the patch was?
Comment 11 Petr Hrebejk 2004-06-07 17:50:37 UTC
Jesses changes are back should be back.
Comment 12 Jiri Skrivanek 2004-06-09 13:40:39 UTC
Verifying that find works well.