Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1861)

Unified Diff: Source/devtools/front_end/settings/EditFileSystemDialog.js

Issue 421123003: DevTools: Suggest inspector reload after workspace mappings changes in settings. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/settings/EditFileSystemDialog.js
diff --git a/Source/devtools/front_end/settings/EditFileSystemDialog.js b/Source/devtools/front_end/settings/EditFileSystemDialog.js
index e332bff9e3d07f6c525a5b0c663e0407adb6eba0..56d7f088dc29e970be6da49ec78570c4f6d1ee20 100644
--- a/Source/devtools/front_end/settings/EditFileSystemDialog.js
+++ b/Source/devtools/front_end/settings/EditFileSystemDialog.js
@@ -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 inspector after making these changes. Would you like to restart it?")))
dgozman 2014/08/01 10:34:10 Should we use the term "DevTools" instead of "insp
+ 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;
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698