OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * | 10 * |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 var scriptsOutlineElement = this.element.createChild("div", "navigator"); | 37 var scriptsOutlineElement = this.element.createChild("div", "navigator"); |
38 this._scriptsTree = new TreeOutlineInShadow(); | 38 this._scriptsTree = new TreeOutlineInShadow(); |
39 this._scriptsTree.registerRequiredCSS("sources/navigatorView.css"); | 39 this._scriptsTree.registerRequiredCSS("sources/navigatorView.css"); |
40 this._scriptsTree.setComparator(WebInspector.NavigatorView._treeElementsComp
are); | 40 this._scriptsTree.setComparator(WebInspector.NavigatorView._treeElementsComp
are); |
41 this.element.appendChild(this._scriptsTree.element); | 41 this.element.appendChild(this._scriptsTree.element); |
42 this.setDefaultFocusedElement(this._scriptsTree.element); | 42 this.setDefaultFocusedElement(this._scriptsTree.element); |
43 | 43 |
44 /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.NavigatorUISource
CodeTreeNode>} */ | 44 /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.NavigatorUISource
CodeTreeNode>} */ |
45 this._uiSourceCodeNodes = new Map(); | 45 this._uiSourceCodeNodes = new Map(); |
46 /** @type {!Map.<!WebInspector.NavigatorTreeNode, !Map.<string, !WebInspecto
r.NavigatorFolderTreeNode>>} */ | 46 /** @type {!Map.<string, !WebInspector.NavigatorFolderTreeNode>} */ |
47 this._subfolderNodes = new Map(); | 47 this._subfolderNodes = new Map(); |
48 | 48 |
49 this._rootNode = new WebInspector.NavigatorRootTreeNode(this); | 49 this._rootNode = new WebInspector.NavigatorRootTreeNode(this); |
50 this._rootNode.populate(); | 50 this._rootNode.populate(); |
51 | 51 |
52 this.element.addEventListener("contextmenu", this.handleContextMenu.bind(thi
s), false); | 52 this.element.addEventListener("contextmenu", this.handleContextMenu.bind(thi
s), false); |
53 } | 53 } |
54 | 54 |
55 WebInspector.NavigatorView.Events = { | 55 WebInspector.NavigatorView.Events = { |
56 ItemSelected: "ItemSelected", | 56 ItemSelected: "ItemSelected", |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 }, | 108 }, |
109 | 109 |
110 /** | 110 /** |
111 * @param {!WebInspector.UISourceCode} uiSourceCode | 111 * @param {!WebInspector.UISourceCode} uiSourceCode |
112 */ | 112 */ |
113 _addUISourceCode: function(uiSourceCode) | 113 _addUISourceCode: function(uiSourceCode) |
114 { | 114 { |
115 if (!this.accept(uiSourceCode)) | 115 if (!this.accept(uiSourceCode)) |
116 return; | 116 return; |
117 var isFromSourceMap = uiSourceCode.contentType().isFromSourceMap(); | 117 var isFromSourceMap = uiSourceCode.contentType().isFromSourceMap(); |
118 var projectNode = this._projectNode(uiSourceCode.project(), isFromSource
Map); | 118 var path; |
119 var folderNode = this._folderNode(projectNode, uiSourceCode.parentPath()
, isFromSourceMap); | 119 if (uiSourceCode.project().type() === WebInspector.projectTypes.FileSyst
em) |
| 120 path = WebInspector.FileSystemWorkspaceBinding.relativePath(uiSource
Code).slice(0, -1); |
| 121 else |
| 122 path = WebInspector.ParsedURL.splitURLIntoPathComponents(uiSourceCod
e.path()).slice(1, -1); |
| 123 var folderNode = this._folderNode(uiSourceCode.project(), uiSourceCode.h
ost(), path, isFromSourceMap); |
120 var uiSourceCodeNode = new WebInspector.NavigatorUISourceCodeTreeNode(th
is, uiSourceCode); | 124 var uiSourceCodeNode = new WebInspector.NavigatorUISourceCodeTreeNode(th
is, uiSourceCode); |
121 this._uiSourceCodeNodes.set(uiSourceCode, uiSourceCodeNode); | 125 this._uiSourceCodeNodes.set(uiSourceCode, uiSourceCodeNode); |
122 folderNode.appendChild(uiSourceCodeNode); | 126 folderNode.appendChild(uiSourceCodeNode); |
123 }, | 127 }, |
124 | 128 |
125 /** | 129 /** |
126 * @param {!WebInspector.Event} event | 130 * @param {!WebInspector.Event} event |
127 */ | 131 */ |
128 _uiSourceCodeAdded: function(event) | 132 _uiSourceCodeAdded: function(event) |
129 { | 133 { |
(...skipping 16 matching lines...) Expand all Loading... |
146 _projectRemoved: function(event) | 150 _projectRemoved: function(event) |
147 { | 151 { |
148 var project = /** @type {!WebInspector.Project} */ (event.data); | 152 var project = /** @type {!WebInspector.Project} */ (event.data); |
149 var uiSourceCodes = project.uiSourceCodes(); | 153 var uiSourceCodes = project.uiSourceCodes(); |
150 for (var i = 0; i < uiSourceCodes.length; ++i) | 154 for (var i = 0; i < uiSourceCodes.length; ++i) |
151 this._removeUISourceCode(uiSourceCodes[i]); | 155 this._removeUISourceCode(uiSourceCodes[i]); |
152 }, | 156 }, |
153 | 157 |
154 /** | 158 /** |
155 * @param {!WebInspector.Project} project | 159 * @param {!WebInspector.Project} project |
156 * @param {boolean} isFromSourceMap | 160 * @param {string} projectHost |
157 * @return {!WebInspector.NavigatorTreeNode} | 161 * @param {!Array<string>} path |
158 */ | |
159 _projectNode: function(project, isFromSourceMap) | |
160 { | |
161 if (!project.displayName()) | |
162 return this._rootNode; | |
163 | |
164 var projectNode = this._rootNode.child(project.id()); | |
165 if (!projectNode) { | |
166 projectNode = this._createProjectNode(project, isFromSourceMap); | |
167 this._rootNode.appendChild(projectNode); | |
168 } | |
169 return projectNode; | |
170 }, | |
171 | |
172 /** | |
173 * @param {!WebInspector.Project} project | |
174 * @param {boolean} isFromSourceMap | |
175 * @return {!WebInspector.NavigatorTreeNode} | |
176 */ | |
177 _createProjectNode: function(project, isFromSourceMap) | |
178 { | |
179 var type; | |
180 if (isFromSourceMap) | |
181 type = WebInspector.NavigatorView.Types.SourceMapFolder; | |
182 else | |
183 type = project.type() === WebInspector.projectTypes.FileSystem ? Web
Inspector.NavigatorView.Types.FileSystem : WebInspector.NavigatorView.Types.Doma
in; | |
184 var projectNode = new WebInspector.NavigatorFolderTreeNode(this, project
, project.id(), type, "", project.displayName()); | |
185 return projectNode; | |
186 }, | |
187 | |
188 /** | |
189 * @param {!WebInspector.NavigatorTreeNode} projectNode | |
190 * @param {string} folderPath | |
191 * @param {boolean} fromSourceMap | 162 * @param {boolean} fromSourceMap |
192 * @return {!WebInspector.NavigatorTreeNode} | 163 * @return {!WebInspector.NavigatorTreeNode} |
193 */ | 164 */ |
194 _folderNode: function(projectNode, folderPath, fromSourceMap) | 165 _folderNode: function(project, projectHost, path, fromSourceMap) |
195 { | 166 { |
196 if (!folderPath) | 167 if (project.type() === WebInspector.projectTypes.Snippets) |
197 return projectNode; | 168 return this._rootNode; |
198 | 169 |
199 var subfolderNodes = this._subfolderNodes.get(projectNode); | 170 var folderPath = path.join("/"); |
200 if (!subfolderNodes) { | 171 var folderId = project.id() + ":" + projectHost + ":" + folderPath; |
201 subfolderNodes = /** @type {!Map.<string, !WebInspector.NavigatorFol
derTreeNode>} */ (new Map()); | 172 var folderNode = this._subfolderNodes.get(folderId); |
202 this._subfolderNodes.set(projectNode, subfolderNodes); | |
203 } | |
204 | |
205 var folderNode = subfolderNodes.get(folderPath); | |
206 if (folderNode) | 173 if (folderNode) |
207 return folderNode; | 174 return folderNode; |
208 | 175 |
209 var parentNode = projectNode; | 176 var parentNode = path.length ? this._folderNode(project, projectHost, pa
th.slice(0, -1), fromSourceMap) : this._rootNode; |
210 var index = folderPath.lastIndexOf("/"); | |
211 if (index !== -1) | |
212 parentNode = this._folderNode(projectNode, folderPath.substring(0, i
ndex), fromSourceMap); | |
213 | 177 |
214 var name = folderPath.substring(index + 1); | 178 var type = fromSourceMap ? WebInspector.NavigatorView.Types.SourceMapFol
der : WebInspector.NavigatorView.Types.Folder; |
215 folderNode = new WebInspector.NavigatorFolderTreeNode(this, null, name,
fromSourceMap ? WebInspector.NavigatorView.Types.SourceMapFolder : WebInspector.
NavigatorView.Types.Folder, folderPath, name); | 179 var name = path[path.length - 1]; |
216 subfolderNodes.set(folderPath, folderNode); | 180 if (parentNode === this._rootNode) { |
| 181 var target = WebInspector.NetworkProject.targetForProject(project); |
| 182 if (target) { |
| 183 name = this._computeProjectDisplayName(target, projectHost); |
| 184 if (!fromSourceMap) |
| 185 type = WebInspector.NavigatorView.Types.Domain; |
| 186 } else { |
| 187 name = project.displayName(); |
| 188 } |
| 189 } |
| 190 |
| 191 folderNode = new WebInspector.NavigatorFolderTreeNode(this, project, fol
derId, type, folderPath, name); |
| 192 this._subfolderNodes.set(folderId, folderNode); |
217 parentNode.appendChild(folderNode); | 193 parentNode.appendChild(folderNode); |
218 return folderNode; | 194 return folderNode; |
219 }, | 195 }, |
220 | 196 |
221 /** | 197 /** |
| 198 * @param {!WebInspector.Target} target |
| 199 * @param {string} projectHost |
| 200 * @return {string} |
| 201 */ |
| 202 _computeProjectDisplayName: function(target, projectHost) |
| 203 { |
| 204 for (var context of target.runtimeModel.executionContexts()) { |
| 205 if (context.name && context.origin && projectHost.startsWith(context
.origin)) |
| 206 return context.name; |
| 207 } |
| 208 |
| 209 var targetSuffix = target.isPage() ? "" : " \u2014 " + target.name(); |
| 210 if (!projectHost) |
| 211 return WebInspector.UIString("(no domain)") + targetSuffix; |
| 212 var parsedURL = new WebInspector.ParsedURL(projectHost); |
| 213 var prettyURL = parsedURL.isValid ? parsedURL.host + (parsedURL.port ? (
":" + parsedURL.port) : "") : ""; |
| 214 return (prettyURL || projectHost) + targetSuffix; |
| 215 }, |
| 216 |
| 217 /** |
222 * @param {!WebInspector.UISourceCode} uiSourceCode | 218 * @param {!WebInspector.UISourceCode} uiSourceCode |
223 * @param {boolean=} select | 219 * @param {boolean=} select |
224 */ | 220 */ |
225 revealUISourceCode: function(uiSourceCode, select) | 221 revealUISourceCode: function(uiSourceCode, select) |
226 { | 222 { |
227 var node = this._uiSourceCodeNodes.get(uiSourceCode); | 223 var node = this._uiSourceCodeNodes.get(uiSourceCode); |
228 if (!node) | 224 if (!node) |
229 return; | 225 return; |
230 if (this._scriptsTree.selectedTreeElement) | 226 if (this._scriptsTree.selectedTreeElement) |
231 this._scriptsTree.selectedTreeElement.deselect(); | 227 this._scriptsTree.selectedTreeElement.deselect(); |
(...skipping 21 matching lines...) Expand all Loading... |
253 | 249 |
254 /** | 250 /** |
255 * @param {!WebInspector.UISourceCode} uiSourceCode | 251 * @param {!WebInspector.UISourceCode} uiSourceCode |
256 */ | 252 */ |
257 _removeUISourceCode: function(uiSourceCode) | 253 _removeUISourceCode: function(uiSourceCode) |
258 { | 254 { |
259 var node = this._uiSourceCodeNodes.get(uiSourceCode); | 255 var node = this._uiSourceCodeNodes.get(uiSourceCode); |
260 if (!node) | 256 if (!node) |
261 return; | 257 return; |
262 | 258 |
263 var projectNode = this._projectNode(uiSourceCode.project(), false); | |
264 var subfolderNodes = this._subfolderNodes.get(projectNode); | |
265 var parentNode = node.parent; | 259 var parentNode = node.parent; |
266 this._uiSourceCodeNodes.remove(uiSourceCode); | 260 this._uiSourceCodeNodes.remove(uiSourceCode); |
267 parentNode.removeChild(node); | 261 parentNode.removeChild(node); |
268 node = parentNode; | 262 node = parentNode; |
269 | 263 |
270 while (node) { | 264 while (node) { |
271 parentNode = node.parent; | 265 parentNode = node.parent; |
272 if (!parentNode || !node.isEmpty()) | 266 if (!parentNode || !node.isEmpty()) |
273 break; | 267 break; |
274 if (subfolderNodes) | 268 this._subfolderNodes.remove(uiSourceCode.project().id() + ":" + uiSo
urceCode.host() + ":" + node._folderPath); |
275 subfolderNodes.remove(node._folderPath); | |
276 parentNode.removeChild(node); | 269 parentNode.removeChild(node); |
277 node = parentNode; | 270 node = parentNode; |
278 } | 271 } |
279 }, | 272 }, |
280 | 273 |
281 reset: function() | 274 reset: function() |
282 { | 275 { |
283 var nodes = this._uiSourceCodeNodes.valuesArray(); | 276 var nodes = this._uiSourceCodeNodes.valuesArray(); |
284 for (var i = 0; i < nodes.length; ++i) | 277 for (var i = 0; i < nodes.length; ++i) |
285 nodes[i].dispose(); | 278 nodes[i].dispose(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 322 |
330 /** | 323 /** |
331 * @param {!WebInspector.Project} project | 324 * @param {!WebInspector.Project} project |
332 * @param {string} path | 325 * @param {string} path |
333 */ | 326 */ |
334 _handleContextMenuExclude: function(project, path) | 327 _handleContextMenuExclude: function(project, path) |
335 { | 328 { |
336 var shouldExclude = window.confirm(WebInspector.UIString("Are you sure y
ou want to exclude this folder?")); | 329 var shouldExclude = window.confirm(WebInspector.UIString("Are you sure y
ou want to exclude this folder?")); |
337 if (shouldExclude) { | 330 if (shouldExclude) { |
338 WebInspector.startBatchUpdate(); | 331 WebInspector.startBatchUpdate(); |
339 project.excludeFolder(path); | 332 project.excludeFolder(WebInspector.FileSystemWorkspaceBinding.comple
teURL(project, path)); |
340 WebInspector.endBatchUpdate(); | 333 WebInspector.endBatchUpdate(); |
341 } | 334 } |
342 }, | 335 }, |
343 | 336 |
344 /** | 337 /** |
345 * @param {!WebInspector.UISourceCode} uiSourceCode | 338 * @param {!WebInspector.UISourceCode} uiSourceCode |
346 */ | 339 */ |
347 _handleContextMenuDelete: function(uiSourceCode) | 340 _handleContextMenuDelete: function(uiSourceCode) |
348 { | 341 { |
349 var shouldDelete = window.confirm(WebInspector.UIString("Are you sure yo
u want to delete this file?")); | 342 var shouldDelete = window.confirm(WebInspector.UIString("Are you sure yo
u want to delete this file?")); |
(...skipping 22 matching lines...) Expand all Loading... |
372 | 365 |
373 contextMenu.show(); | 366 contextMenu.show(); |
374 }, | 367 }, |
375 | 368 |
376 /** | 369 /** |
377 * @param {!Event} event | 370 * @param {!Event} event |
378 * @param {!WebInspector.NavigatorFolderTreeNode} node | 371 * @param {!WebInspector.NavigatorFolderTreeNode} node |
379 */ | 372 */ |
380 handleFolderContextMenu: function(event, node) | 373 handleFolderContextMenu: function(event, node) |
381 { | 374 { |
| 375 var path = node._folderPath; |
| 376 var project = node._project; |
| 377 |
382 var contextMenu = new WebInspector.ContextMenu(event); | 378 var contextMenu = new WebInspector.ContextMenu(event); |
383 var path = "/"; | |
384 var projectNode = node; | |
385 while (projectNode.parent !== this._rootNode) { | |
386 path = "/" + projectNode.id + path; | |
387 projectNode = projectNode.parent; | |
388 } | |
389 | 379 |
390 var project = projectNode._project; | 380 if (project && project.type() === WebInspector.projectTypes.FileSystem)
{ |
391 | |
392 if (project.type() === WebInspector.projectTypes.FileSystem) { | |
393 contextMenu.appendItem(WebInspector.UIString.capitalize("Refresh"),
this._handleContextMenuRefresh.bind(this, project, path)); | 381 contextMenu.appendItem(WebInspector.UIString.capitalize("Refresh"),
this._handleContextMenuRefresh.bind(this, project, path)); |
394 contextMenu.appendItem(WebInspector.UIString.capitalize("New ^file")
, this._handleContextMenuCreate.bind(this, project, path)); | 382 contextMenu.appendItem(WebInspector.UIString.capitalize("New ^file")
, this._handleContextMenuCreate.bind(this, project, path)); |
395 contextMenu.appendItem(WebInspector.UIString.capitalize("Exclude ^fo
lder"), this._handleContextMenuExclude.bind(this, project, path)); | 383 contextMenu.appendItem(WebInspector.UIString.capitalize("Exclude ^fo
lder"), this._handleContextMenuExclude.bind(this, project, path)); |
396 } | 384 } |
397 contextMenu.appendSeparator(); | 385 contextMenu.appendSeparator(); |
398 WebInspector.NavigatorView.appendAddFolderItem(contextMenu); | 386 WebInspector.NavigatorView.appendAddFolderItem(contextMenu); |
399 | 387 |
400 function removeFolder() | 388 function removeFolder() |
401 { | 389 { |
402 var shouldRemove = window.confirm(WebInspector.UIString("Are you sur
e you want to remove this folder?")); | 390 var shouldRemove = window.confirm(WebInspector.UIString("Are you sur
e you want to remove this folder?")); |
403 if (shouldRemove) | 391 if (shouldRemove) |
404 project.remove(); | 392 project.remove(); |
405 } | 393 } |
406 | 394 |
407 if (project.type() === WebInspector.projectTypes.FileSystem && node ===
projectNode) { | 395 if (project.type() === WebInspector.projectTypes.FileSystem) { |
408 var removeFolderLabel = WebInspector.UIString.capitalize("Remove ^fo
lder from ^workspace"); | 396 var removeFolderLabel = WebInspector.UIString.capitalize("Remove ^fo
lder from ^workspace"); |
409 contextMenu.appendItem(removeFolderLabel, removeFolder); | 397 contextMenu.appendItem(removeFolderLabel, removeFolder); |
410 } | 398 } |
411 | 399 |
412 contextMenu.show(); | 400 contextMenu.show(); |
413 }, | 401 }, |
414 | 402 |
415 /** | 403 /** |
416 * @param {!WebInspector.UISourceCode} uiSourceCode | 404 * @param {!WebInspector.UISourceCode} uiSourceCode |
417 * @param {boolean} deleteIfCanceled | 405 * @param {boolean} deleteIfCanceled |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 | 882 |
895 /** | 883 /** |
896 * @return {boolean} | 884 * @return {boolean} |
897 */ | 885 */ |
898 isEmpty: function() | 886 isEmpty: function() |
899 { | 887 { |
900 return !this._children.size; | 888 return !this._children.size; |
901 }, | 889 }, |
902 | 890 |
903 /** | 891 /** |
904 * @param {string} id | |
905 * @return {?WebInspector.NavigatorTreeNode} | |
906 */ | |
907 child: function(id) | |
908 { | |
909 return this._children.get(id) || null; | |
910 }, | |
911 | |
912 /** | |
913 * @return {!Array.<!WebInspector.NavigatorTreeNode>} | 892 * @return {!Array.<!WebInspector.NavigatorTreeNode>} |
914 */ | 893 */ |
915 children: function() | 894 children: function() |
916 { | 895 { |
917 return this._children.valuesArray(); | 896 return this._children.valuesArray(); |
918 }, | 897 }, |
919 | 898 |
920 /** | 899 /** |
921 * @param {!WebInspector.NavigatorTreeNode} node | 900 * @param {!WebInspector.NavigatorTreeNode} node |
922 */ | 901 */ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 } | 957 } |
979 | 958 |
980 /** | 959 /** |
981 * @constructor | 960 * @constructor |
982 * @extends {WebInspector.NavigatorTreeNode} | 961 * @extends {WebInspector.NavigatorTreeNode} |
983 * @param {!WebInspector.NavigatorView} navigatorView | 962 * @param {!WebInspector.NavigatorView} navigatorView |
984 * @param {!WebInspector.UISourceCode} uiSourceCode | 963 * @param {!WebInspector.UISourceCode} uiSourceCode |
985 */ | 964 */ |
986 WebInspector.NavigatorUISourceCodeTreeNode = function(navigatorView, uiSourceCod
e) | 965 WebInspector.NavigatorUISourceCodeTreeNode = function(navigatorView, uiSourceCod
e) |
987 { | 966 { |
988 WebInspector.NavigatorTreeNode.call(this, uiSourceCode.name()); | 967 WebInspector.NavigatorTreeNode.call(this, uiSourceCode.project().id() + ":"
+ uiSourceCode.path()); |
989 this._navigatorView = navigatorView; | 968 this._navigatorView = navigatorView; |
990 this._uiSourceCode = uiSourceCode; | 969 this._uiSourceCode = uiSourceCode; |
991 this._treeElement = null; | 970 this._treeElement = null; |
992 } | 971 } |
993 | 972 |
994 WebInspector.NavigatorUISourceCodeTreeNode.prototype = { | 973 WebInspector.NavigatorUISourceCodeTreeNode.prototype = { |
995 /** | 974 /** |
996 * @return {!WebInspector.UISourceCode} | 975 * @return {!WebInspector.UISourceCode} |
997 */ | 976 */ |
998 uiSourceCode: function() | 977 uiSourceCode: function() |
(...skipping 24 matching lines...) Expand all Loading... |
1023 * @param {boolean=} ignoreIsDirty | 1002 * @param {boolean=} ignoreIsDirty |
1024 */ | 1003 */ |
1025 updateTitle: function(ignoreIsDirty) | 1004 updateTitle: function(ignoreIsDirty) |
1026 { | 1005 { |
1027 if (!this._treeElement) | 1006 if (!this._treeElement) |
1028 return; | 1007 return; |
1029 | 1008 |
1030 var titleText = this._uiSourceCode.displayName(); | 1009 var titleText = this._uiSourceCode.displayName(); |
1031 if (!ignoreIsDirty && (this._uiSourceCode.isDirty() || this._uiSourceCod
e.hasUnsavedCommittedChanges())) | 1010 if (!ignoreIsDirty && (this._uiSourceCode.isDirty() || this._uiSourceCod
e.hasUnsavedCommittedChanges())) |
1032 titleText = "*" + titleText; | 1011 titleText = "*" + titleText; |
1033 var tooltip = titleText; | 1012 this._treeElement.title = titleText; |
| 1013 |
| 1014 var tooltip = this._uiSourceCode.originURL(); |
1034 if (this._uiSourceCode.contentType().isFromSourceMap()) | 1015 if (this._uiSourceCode.contentType().isFromSourceMap()) |
1035 tooltip = WebInspector.UIString("%s (from source map)", this._uiSour
ceCode.displayName()); | 1016 tooltip = WebInspector.UIString("%s (from source map)", this._uiSour
ceCode.displayName()); |
1036 this._treeElement.title = titleText; | |
1037 this._treeElement.tooltip = tooltip; | 1017 this._treeElement.tooltip = tooltip; |
1038 }, | 1018 }, |
1039 | 1019 |
1040 /** | 1020 /** |
1041 * @override | 1021 * @override |
1042 * @return {boolean} | 1022 * @return {boolean} |
1043 */ | 1023 */ |
1044 hasChildren: function() | 1024 hasChildren: function() |
1045 { | 1025 { |
1046 return false; | 1026 return false; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 | 1262 |
1283 willRemoveChild: function(node) | 1263 willRemoveChild: function(node) |
1284 { | 1264 { |
1285 if (node._isMerged || !this.isPopulated()) | 1265 if (node._isMerged || !this.isPopulated()) |
1286 return; | 1266 return; |
1287 this._treeElement.removeChild(node._treeElement); | 1267 this._treeElement.removeChild(node._treeElement); |
1288 }, | 1268 }, |
1289 | 1269 |
1290 __proto__: WebInspector.NavigatorTreeNode.prototype | 1270 __proto__: WebInspector.NavigatorTreeNode.prototype |
1291 } | 1271 } |
OLD | NEW |