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.
There should be an option if user wants to search only the active editor window or all opened source files.
Priority is changed to P4 (normal).
So, here is suggestion for option like "Search in current file only/Search in all opened files". This option could be two level, possibly. There would be appropriate property in editor options. Beside it the same option would be in Find dialog (however in some second, less important section... together with others similar). Setting this option would override the global one. **** And next question is what about option whether highlight also new strings written after their prior searching. Yes, this is very minor...
Only changed version to Development.
Target milestone -> 3.3
Changing the state of the issue to ASSIGNED, because it was cover in Requirements document at http://editor.netbeans.org/doc/Requirements.html
Target milestone -> 3.3.1.
Set target milestone to TBD
Changing subcomponent to "search"
*** Bug 124735 has been marked as a duplicate of this bug. ***
*** Bug 208187 has been marked as a duplicate of this bug. ***
Created attachment 131927 [details] Proposed patch I like to propose the given patch to solve this issue. The patch includes a SearchScopeProvider for all the open documents. FYI: I couldn't create a patch with the binary icon, so i will attach it separately. The icon is needed for the RFE in http://netbeans.org/bugzilla/show_bug.cgi?id=222406 and taken from the same commit. @NB-Devs: Please review, discuss and commit. Thank you.
Created attachment 131928 [details] Icon for the SearchScope
Created attachment 131929 [details] Shows the patch in action
Good job! Thank you very much for the patch. I've encountered some (null pointer) exceptions, so I slightly modified method getCurrentlyOpenedFiles(). Please check it and let me know if you can find any problem there. Integrated as http://hg.netbeans.org/core-main/rev/74c85cd4b12d
(In reply to comment #15) > Good job! Thank you very much for the patch. > > I've encountered some (null pointer) exceptions, so I slightly modified method > getCurrentlyOpenedFiles(). Please check it and let me know if you can find any > problem there. > > Integrated as http://hg.netbeans.org/core-main/rev/74c85cd4b12d You are right, there isn't always a DataObject available. Looks good. Do we have to inform/warn the user that it only works for file-based documents and unchanged modifications in open documents cannot be tracked?
(In reply to comment #16) > Do we have to inform/warn the user that it only works for file-based documents > and unchanged modifications in open documents cannot be tracked? We've discussed it and concluded that the current state seems fine. The warning is shown in Search Results window if some files are not saved (it's the same for other search scopes); and it should be, hopefully, obvious that only file-based documents can be searched (again, this applies to all search scopes). If some confusion is reported, we can reconsider it in the future.
Integrated into 'main-golden', will be available in build *201302282300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/74c85cd4b12d User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #5009: Searching in all opened source files
*** Bug 181446 has been marked as a duplicate of this bug. ***