Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344200 - [client] global search and replace
Summary: [client] global search and replace
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: 0.4 M2   Edit
Assignee: libing wang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 361447 (view as bug list)
Depends on: 362215 367526
Blocks:
  Show dependency tree
 
Reported: 2011-04-28 16:30 EDT by Susan McCourt CLA
Modified: 2012-01-14 00:17 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2011-04-28 16:30:48 EDT
it was mentioned on the Orion call this morning that global search/replace is a feature that sends many folks back to Eclipse IDE.

We currently don't have anyone investing in this.
Comment 1 Susan McCourt CLA 2011-04-28 16:34:39 EDT
marking this M8 because it's a self hosting blocker, but we need to assign it someone.
Comment 2 Simon Kaegi CLA 2011-07-14 12:00:05 EDT
Moving this to 0.3 as it's now part of the plan
Comment 3 libing wang CLA 2011-07-18 15:06:23 EDT
Talked to John today about the global search using Lucene.
He ,mentioned some good points;
1.Currently the number of the result is configured to be 10, we need to render all the result that search engine returns.

2.We should render all the returned files in a tree structure like the navigator does.
Plus : in my opinion we should also list up all the positions where keywords occurs.

3.Able to manage search result. e.g.: we should implement actions to filter out unwanted result.

4.Prev/next search result is nice to have, like Eclipse does.
Comment 4 John Arthorne CLA 2011-10-20 15:15:52 EDT
*** Bug 361447 has been marked as a duplicate of this bug. ***
Comment 5 libing wang CLA 2011-10-28 08:50:38 EDT
John, I remembered that you mentioned sever side support on this.
Lets make it clear if we really need this.
Comment 6 libing wang CLA 2011-10-28 10:26:08 EDT
We should also consider web dev case:
If we are going to need server support on replace, we are assuming web dev server will provide the service as well. Is that possible?
Comment 7 libing wang CLA 2011-10-28 15:25:17 EDT
Talked to Simon about this.
I don't think we should rely on server side for replacing.
We should just walk through all the matching files, use fileClient.read() to get the file content, replace all, and use fileClient.write() to put them back.

We also need a preview UI for the user before we use fileCLient.write().
Comment 8 libing wang CLA 2011-11-03 15:11:08 EDT
Talked to John about how bug 362827 will affect replace.
We also need to think about paging in the preview so that user can preview, confirm and commit replace per page.
Also in the report page we also need to consider not only the write failure but also the case when the file has been changed somewhere else.
Comment 9 libing wang CLA 2012-01-14 00:03:09 EST
fixed with 
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7ceb6291b5abc621f02fdfe268379d2c3ae1dc16

After a long journey of coding, I an closing this bug now.
Here is the summary of the work flow:
1. Search for a key word. You are now on "result" state.
2. On the left hand of the tool bar, you can type a replace string and hit enter.
3. It brings you to the "preview" state. 
4. You can use 3 levels of check box (All , file , match) to filter what you want to replace.
5. You can click on the files to preview the diff.
6. On the tool bar, clicking on "cancel" will bring you back to the "result" state. Clicking on "replace" will write all the selected files and bring you to the "report" state. You will see all the information on each file:
   Status: "succeed" or "failed" or "User canceled the write when there is conflict"
   How many matches out of total matches were replaced.

7.In the report page, clicking on "done" will reload the page and you will see stale files if there is any.

I will write some details in the wiki or blog some thing out later.

Please open separate bugs if you have any enhancement ideas.