Bug 14523 - Moving file while open in the editor does not reopen it for the new location
Summary: Moving file while open in the editor does not reopen it for the new location
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: 4.0.12
Hardware: PC All
: Low enhancement
Target Milestone: master
Assignee: Marius Ungureanu
URL:
Depends on:
Blocks:
 
Reported: 2013-09-07 19:18 UTC by David Jeske
Modified: 2016-04-27 20:32 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description David Jeske 2013-09-07 19:18:36 UTC
Description of Problem:

If you have a file "Foo.cs" open in a Xamarin code editor, and you drag that file to a group/folder so it becomes "Bar/Foo.cs", Xamarin does not point the editor context at the new location Bar/Foo.cs. This causes all kinds of confusion, as Xamarin will allow you to separately open Bar/Foo.cs, and on Foo.cs it shows you a "reload from disk" dialog. If you "save" instead of reverting to the "deleted" state on disk, then you end up with a duplicate Foo.cs that you didn't want.

When you move (or delete) a file in the project, any open Xamarin editor contexts pointing to that file should be moved as well (or closed). (FYI - this is the behavior in other IDEs, including Visual Studio)

Steps to reproduce the problem:
1. Make a project with a single file Foo.cs. 
2. Open Foo.cs in a Xamarin code editor. 
3. Save/compile/run the project
4. Right click on your project in the solution explorer and choose "Add->New Folder", rename it to "Bar"
5. drag Foo.cs to the new folder
6. Double click on Bar/Foo.cs 

Actual Results:

7. WITNESS: you now have two copies of the file open, Bar/Foo.cs and the old Foo.cs
8. WITNESS: if you select Foo.cs, it gives you the "changed on disk dialog"

Expected Results:

EXPECTED: it to just point the open Foo.cs editor tab at Bar/Foo.cs

How often does this happen? 

Every time.

Additional Information:
Comment 1 Marius Ungureanu 2013-09-19 13:09:19 UTC
I think mkrueger fixed the part where the file remained open. Not pointing to the new document will be implemented shortly.
Comment 2 Marius Ungureanu 2013-12-08 09:29:23 UTC
Changed the description to match the other half of the behaviour.
Comment 3 Marius Ungureanu 2016-04-27 20:32:27 UTC
This is now working in Xamarin Studio 6.0+.