Bug 396824 - doing a search-replace on a file which is open in the editor with changes corrupts the copy on disc if the edit is abandoned, or fails to do the replace in the opened file if not abandoned.
Summary: doing a search-replace on a file which is open in the editor with changes cor...
Status: RESOLVED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Search (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-Search-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
: 396757 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-18 06:09 EST by david collier CLA
Modified: 2012-12-18 08:01 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description david collier CLA 2012-12-18 06:09:41 EST
see also 396757, but this is NOT the same issue.

If you open a file and make a change in the window - then run a search-replace which SHOULD affect that file, the replace does not "appear" in the window.

So the global replace is not global on opened-and-previously-edited files.

WORSE - if you then abandon the edit, and examine the copy on disk, the change will have been mis-applied there - it is 'as if' the character positions to do the change have been taken from the open edited file, but then the operation was executed on the unedited disk copy.

To my mind - the global exchange should be executed independently on both the pre-edit disk copy and the open window, since you cannot know whether the edit will later be abandoned.
Comment 1 david collier CLA 2012-12-18 06:13:14 EST
OK - I can now confirm that if, after the exchange you go on to make furthe edits, then attempting to close the file produces the effect detailed in bug 396757.

So contrary to my original post - this IS the same bug.
Comment 2 david collier CLA 2012-12-18 06:16:07 EST
*** Bug 396757 has been marked as a duplicate of this bug. ***
Comment 3 Dani Megert CLA 2012-12-18 07:02:42 EST
Sorry, but this works fine using Eclipse SDK 4.2.1 or 4.3 M4 i.e. I see how the editor is updated on replace and I do not get any errors later.

Can you provide more detailed steps. What kind of editor is used?
Comment 4 david collier CLA 2012-12-18 07:31:40 EST
I was hoping that under 'help' in the IDE I could copy a list of everything about my installation to the clipboard, but if it can be done I can't see how.

I'm running Juno. if you can tell me where to find the more detailed numbers I'll be delighted to dig them out.

OK ---- this is a shelled bug - I now see that it does not happen with the java and C editors.

Where and how do I report that then please?
Comment 5 Dani Megert CLA 2012-12-18 07:39:16 EST
(In reply to comment #4)
> OK ---- this is a shelled bug - I now see that it does not happen with the
> java and C editors.

Which editor are you using exactly?
Comment 6 david collier CLA 2012-12-18 07:42:29 EST
> Which editor are you using exactly?

The bug is only exhibited if I open the file in question with the shelled plugin.

ShellEd
com.something.eclipse.shelled.feature.group
1.0.0
Something Software
Comment 7 david collier CLA 2012-12-18 07:43:25 EST
Which I have now uninstalled !!!
Comment 8 Dani Megert CLA 2012-12-18 07:48:58 EST
Please report your bug against the provider of that plug-in.
Comment 9 david collier CLA 2012-12-18 08:01:11 EST
and re-installed the latest version which does not exhibit the bug. Thanks all.