Browse Source

Fixed SD2-1294: Reloading a file should load the file using a FileUtility.ObservedLoad method

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3500 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
56bd533b84
  1. 10
      src/Main/Base/Project/Src/Services/File/OpenedFile.cs

10
src/Main/Base/Project/Src/Services/File/OpenedFile.cs

@ -285,6 +285,16 @@ namespace ICSharpCode.SharpDevelop @@ -285,6 +285,16 @@ namespace ICSharpCode.SharpDevelop
}
public virtual void ReloadFromDisk()
{
var r = FileUtility.ObservedLoad(ReloadFromDiskInternal, FileName);
if (r == FileOperationResult.Failed) {
if (currentView != null && currentView.WorkbenchWindow != null) {
currentView.WorkbenchWindow.CloseWindow(true);
}
}
}
void ReloadFromDiskInternal()
{
fileData = null;
if (currentView != null) {

Loading…
Cancel
Save