Bug 61815 - Java Search needs Replace! (and Whole Word)
Summary: Java Search needs Replace! (and Whole Word)
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Search-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-11 17:37 EDT by Tom Roche CLA
Modified: 2004-05-12 08:53 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Roche CLA 2004-05-11 17:37:50 EDT
The Java Search dialog tab (reached via, e.g., C-h>Java Search) should
support the Replace action (with the Whole Word option). What I mean:

I'm running on 3.0-M8. My group is getting old source (many KLOC)
running on a new base. Among the many tasks involved is replacing many
Java type names, e.g. FacesConfig with FacesConfigTypeImpl. It would
be nice to be able to replace all instances of the type name via
C-h>Java Search, since ... these are Java type names! Instead I must
do this with File Search, which has its own problems: see

https://bugs.eclipse.org/bugs/show_bug.cgi?id=61812
Comment 1 Dani Megert CLA 2004-05-12 08:29:09 EDT
Thomas: there's a request in J Core land to support Regex. This would solve the
Whole Word feature request.

Re: replace: not sure whether this makes sense: I would either use text replace
or if in Java land have/use refactoring.
Comment 2 Thomas M??der CLA 2004-05-12 08:53:22 EDT
The are a couple of things here:

- Java search is always "whole word" since it only finds symbol names.
- Refactoring is not really applicable, since the scenario they're describing
(if I understand it right) is that they have a library X that depends on Type A.
But in the new world, there is no type A. Instead there is a new type B, that
has many of the same methods (like Plugin being replaced by Bundle in the
eclipse world).  
The advantage a Java-aware search/replace is that we could identify type
references in many cases (not sure whether that's possible in all cases). 
Anyway, I think the regex support in file search goes a long way.

I'll take the liberty of changing the severity to "enhancement", since this is
clearly a feature request. Feel free to change it back if you disagree.