Community
Participate
Working Groups
Created attachment 232759 [details] foo.js file to reproduce problem Open the attached file foo.js in Orion. Press Cmd-F to open the find bar, type 'new Foo' as the "Find With" string, and 'new utils.Foo' as the "Replace With" string. Then, click Replace All. Expected: replacement occurs, and updated file contents display in the editor. Actual: Editor contents do not change, though foo.js is shown as changed with the '*' indicator at the top. If I save and reload foo.js, only the first occurrence of 'new Foo' has been replaced correctly.
Yep, in the console I get -- Uncaught Error: NotFoundError: DOM Exception 8 textView.js:5758 TextView._setDOMSelection textView.js:5758 TextView._updateDOMSelection textView.js:6353 TextView._setSelection textView.js:5955 TextView._modifyContent textView.js:5449 TextView.setText textView.js:2615 Editor.setText editor.js:321 Find._doReplace find.js:504 Find.replaceAll find.js:335
This didn't take a big file -- I did it with a file containing just 10 new Foo()s
I have similar functionality in the global search page. I will consolidate some shared code for both and add more unite tests. Also, we should not do a loop to simulate the replace step by step any more. We should change the text model once and refresh DOM tree.
I have fixed the exception in TextView. The replace all operation should finished properly now. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=b7ac443edfb08a2b72bfdd8a4684caf8777affa9 Libing, do you want to keep this bug open for the refactoring work or do you prefer to open a new one?
(In reply to comment #4) > I have fixed the exception in TextView. The replace all operation should > finished properly now. > > http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/ > ?id=b7ac443edfb08a2b72bfdd8a4684caf8777affa9 > > Libing, do you want to keep this bug open for the refactoring work or do you > prefer to open a new one? Thanks, Silenio.
I am closing this bug. For the refactor work, I will add this as reminder in Bug 377317.
see bug 377317 commet 2.
The editor exception addressed in this bug was fixed but when I happened to verify it in another test case, it hits bug 411813. It is another issue anyway...