Chromium Code Reviews| Index: Source/devtools/front_end/workspace/Workspace.js |
| diff --git a/Source/devtools/front_end/workspace/Workspace.js b/Source/devtools/front_end/workspace/Workspace.js |
| index 1ee582eb65a3318aeb973e6989d73da437c11842..53f48e02796205635cc73b4c0fbaa97a6f948a12 100644 |
| --- a/Source/devtools/front_end/workspace/Workspace.js |
| +++ b/Source/devtools/front_end/workspace/Workspace.js |
| @@ -573,6 +573,7 @@ WebInspector.Workspace = function(fileSystemMapping) |
| WebInspector.Workspace.Events = { |
| UISourceCodeAdded: "UISourceCodeAdded", |
| UISourceCodeRemoved: "UISourceCodeRemoved", |
| + UISourceCodeEdited: "UISourceCodeEdited", |
| UISourceCodeContentCommitted: "UISourceCodeContentCommitted", |
| ProjectAdded: "ProjectAdded", |
| ProjectRemoved: "ProjectRemoved" |
| @@ -630,6 +631,20 @@ WebInspector.Workspace.prototype = { |
| }, |
| /** |
| + * @param {string} url |
| + * @return {?WebInspector.UISourceCode} |
| + */ |
| + uiSourceCodeForFilePath: function(url) { |
|
pfeldman
2015/08/13 21:15:47
You should not distinguish resources from the file
wes
2015/08/14 00:55:06
I'll double check something but at some point I ad
wes
2015/08/14 01:13:32
Right! I found the other bit I added (the answer t
|
| + var items = this.uiSourceCodesForProjectType(WebInspector.projectTypes.FileSystem); |
| + for (var i = 0; i < items.length; ++i) { |
| + var item = items[i]; |
| + if (item.uri() === url) |
| + return item; |
| + } |
| + return null; |
| + }, |
| + |
| + /** |
| * @param {string} type |
| * @return {!Array.<!WebInspector.UISourceCode>} |
| */ |