Commit e4d4b5a6 authored by vsevik@chromium.org's avatar vsevik@chromium.org

DevTools: Suggest inspector reload after workspace mappings changes in settings.

BUG=357274
R=lushnikov

Review URL: https://codereview.chromium.org/421123003

git-svn-id: svn://svn.chromium.org/blink/trunk@180158 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 08f017e9
......@@ -88,6 +88,7 @@ WebInspector.EditFileSystemDialog = function(fileSystemPath)
this._addExcludedFolderRow(excludedFolderEntries[i]);
this.element.tabIndex = 0;
this._hasMappingChanges = false;
}
WebInspector.EditFileSystemDialog.show = function(element, fileSystemPath)
......@@ -137,6 +138,10 @@ WebInspector.EditFileSystemDialog.prototype = {
willHide: function(event)
{
if (!this._hasMappingChanges)
return;
if (window.confirm(WebInspector.UIString("It is recommended to restart DevTools after making these changes. Would you like to restart it?")))
WebInspector.reload();
},
_fileMappingAdded: function(event)
......@@ -229,6 +234,7 @@ WebInspector.EditFileSystemDialog.prototype = {
var entry = this._entries[urlPrefix];
WebInspector.isolatedFileSystemManager.mapping().removeFileMapping(entry.fileSystemPath, entry.urlPrefix, entry.pathPrefix);
this._hasMappingChanges = true;
},
/**
......@@ -241,6 +247,7 @@ WebInspector.EditFileSystemDialog.prototype = {
var normalizedURLPrefix = this._normalizePrefix(urlPrefix);
var normalizedPathPrefix = this._normalizePrefix(pathPrefix);
WebInspector.isolatedFileSystemManager.mapping().addFileMapping(this._fileSystemPath, normalizedURLPrefix, normalizedPathPrefix);
this._hasMappingChanges = true;
this._fileMappingsList.selectItem(normalizedURLPrefix);
return true;
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment