| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); | 310 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); |
| 311 this._removeUISourceCode(uiSourceCode); | 311 this._removeUISourceCode(uiSourceCode); |
| 312 } | 312 } |
| 313 | 313 |
| 314 /** | 314 /** |
| 315 * @param {!Common.Event} event | 315 * @param {!Common.Event} event |
| 316 */ | 316 */ |
| 317 _projectRemoved(event) { | 317 _projectRemoved(event) { |
| 318 var project = /** @type {!Workspace.Project} */ (event.data); | 318 var project = /** @type {!Workspace.Project} */ (event.data); |
| 319 | 319 |
| 320 var frame = Bindings.NetworkProject.frameForProject(project); | |
| 321 if (frame) | |
| 322 this._discardFrame(frame); | |
| 323 | |
| 324 var uiSourceCodes = project.uiSourceCodes(); | 320 var uiSourceCodes = project.uiSourceCodes(); |
| 325 for (var i = 0; i < uiSourceCodes.length; ++i) | 321 for (var i = 0; i < uiSourceCodes.length; ++i) |
| 326 this._removeUISourceCode(uiSourceCodes[i]); | 322 this._removeUISourceCode(uiSourceCodes[i]); |
| 327 } | 323 } |
| 328 | 324 |
| 329 /** | 325 /** |
| 330 * @param {!Workspace.Project} project | 326 * @param {!Workspace.Project} project |
| 331 * @param {?SDK.Target} target | 327 * @param {?SDK.Target} target |
| 332 * @param {?SDK.ResourceTreeFrame} frame | 328 * @param {?SDK.ResourceTreeFrame} frame |
| 333 * @param {string} projectOrigin | 329 * @param {string} projectOrigin |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 var parentNode = node.parent; | 537 var parentNode = node.parent; |
| 542 parentNode.removeChild(node); | 538 parentNode.removeChild(node); |
| 543 node = parentNode; | 539 node = parentNode; |
| 544 | 540 |
| 545 while (node) { | 541 while (node) { |
| 546 parentNode = node.parent; | 542 parentNode = node.parent; |
| 547 if (!parentNode || !node.isEmpty()) | 543 if (!parentNode || !node.isEmpty()) |
| 548 break; | 544 break; |
| 549 if (!(node instanceof Sources.NavigatorGroupTreeNode || node instanceof
Sources.NavigatorFolderTreeNode)) | 545 if (!(node instanceof Sources.NavigatorGroupTreeNode || node instanceof
Sources.NavigatorFolderTreeNode)) |
| 550 break; | 546 break; |
| 551 if (node._type === Sources.NavigatorView.Types.Frame) | 547 if (node._type === Sources.NavigatorView.Types.Frame) { |
| 548 this._discardFrame(/** @type {!SDK.ResourceTreeFrame} */ (frame)); |
| 552 break; | 549 break; |
| 550 } |
| 553 | 551 |
| 554 var folderId = this._folderNodeId(project, target, frame, uiSourceCode.o
rigin(), node._folderPath); | 552 var folderId = this._folderNodeId(project, target, frame, uiSourceCode.o
rigin(), node._folderPath); |
| 555 this._subfolderNodes.delete(folderId); | 553 this._subfolderNodes.delete(folderId); |
| 556 parentNode.removeChild(node); | 554 parentNode.removeChild(node); |
| 557 node = parentNode; | 555 node = parentNode; |
| 558 } | 556 } |
| 559 } | 557 } |
| 560 this._uiSourceCodeNodes.delete(uiSourceCode); | 558 this._uiSourceCodeNodes.delete(uiSourceCode); |
| 561 } | 559 } |
| 562 | 560 |
| (...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1612 /** | 1610 /** |
| 1613 * @param {string} title | 1611 * @param {string} title |
| 1614 * @override | 1612 * @override |
| 1615 */ | 1613 */ |
| 1616 setTitle(title) { | 1614 setTitle(title) { |
| 1617 this._title = title; | 1615 this._title = title; |
| 1618 if (this._treeElement) | 1616 if (this._treeElement) |
| 1619 this._treeElement.title = this._title; | 1617 this._treeElement.title = this._title; |
| 1620 } | 1618 } |
| 1621 }; | 1619 }; |
| OLD | NEW |