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 - Find in Projects should automatically search on selected text.
Summary: Find in Projects should automatically search on selected text.
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker with 7 votes (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: PLAN, SIMPLEFIX, UI
: 109459 141186 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-09 15:17 UTC by rptmaestro
Modified: 2011-11-10 13:40 UTC (History)
7 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Suggested patch for BasicSearchForm.java (and project.xml) (2.70 KB, patch)
2008-04-11 16:00 UTC, rbalada
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
org.netbeans.modules.search.BasicSearchForm.
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 BasicSearchForm.java (and project.xml)
Comment 4 rbalada 2008-04-11 16:07:00 UTC
Marian,

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'
Changeset: http://hg.netbeans.org/main-golden/rev/ae30d66d6de4
User: Jiri Rechtacek <jrechtacek@netbeans.org>
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 http://bits.netbeans.org/download/trunk/nightly/latest/
Thanks
Comment 11 PowerKiKi 2011-08-04 18:28:19 UTC
This is great, I downloaded netbeans-trunk-nightly-201108040600-ml-php-linux.sh 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)