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 68387

Summary: Find in Projects should automatically search on selected text.
Product: utilities Reporter: rptmaestro <rptmaestro>
Component: SearchAssignee: Jiri Rechtacek <jrechtacek>
Severity: blocker CC: anebuzelsky, issues, jglick, jhavlin, johnjullion, PowerKiKi, vincesheard
Priority: P3 Keywords: PLAN, SIMPLEFIX, UI
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Suggested patch for (and project.xml)

Description rptmaestro 2005-11-09 15:17:02 UTC
When "Find in Projects" is opened using ctrl+shift+p from an editor window that 
has selected text, the search field should be automatically populated with the 
selected text.
Comment 1 Marian Petras 2008-01-16 15:36:09 UTC
I see.

This should be simple to implement. Probably all necessary modification would be in class
Comment 2 Marian Petras 2008-01-16 15:36:27 UTC
*** Issue 109459 has been marked as a duplicate of this issue. ***
Comment 3 rbalada 2008-04-11 16:00:31 UTC
Created attachment 60055 [details]
Suggested patch for (and project.xml)
Comment 4 rbalada 2008-04-11 16:07:00 UTC

please see the attached patch and comment. The code has been copied from
org.netbeans.modules.editor.impl.SearchBar.initBlockSearch() of "Editor" project. The patch introduces new dependency on
Editor Library 2, what could be bit strange.
Comment 5 axk 2008-11-22 21:05:41 UTC
*** Issue 141186 has been marked as a duplicate of this issue. ***
Comment 6 danblanks 2009-02-25 02:42:02 UTC
For the love of god, please do this. 
Comment 7 Marian Petras 2009-03-31 17:13:20 UTC
The patch is almost correct. The only mistake is that it is maybe too aggressive. When the user presses button "Modify
Criteria" in the Search Results window, they would probably expect that the original criteria are pre-filled in the Find
dialogue, and not e.g. text currently selected in the editor. The current patch does not take care of this use-case.
Comment 8 Jiri Rechtacek 2011-06-16 14:11:36 UTC
implemented in core-main/rev/ae30d66d6de4
Comment 9 Quality Engineering 2011-06-17 14:40:19 UTC
Integrated into 'main-golden'
User: Jiri Rechtacek <>
Log: #68387: Find in Projects should automatically search on selected text
Comment 10 Jiri Rechtacek 2011-06-24 07:46:48 UTC
Hi all,
impl. of this RFE is part of recent daily builds. Could someone verify it works as expected?
The latest IDE build is available on
Comment 11 PowerKiKi 2011-08-04 18:28:19 UTC
This is great, I downloaded and it worked exactly as expected.

Thank you !

Is there any recommendation against NOT using nightly build for production use ? dev-only settings which would slow the IDE maybe ?
Comment 12 Jesse Glick 2011-08-04 19:35:05 UTC
(In reply to comment #11)
> Is there any recommendation [for] NOT using nightly build for production use?

Just that they are barely tested, and from time to time serious bugs will appear in a nightly before they are detected and corrected. That said, they are usually fine.
Comment 13 Vladimir Voskresensky 2011-11-09 20:53:01 UTC
it was asked by Studio users very much (Studio is based on 7.0.1)