| 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 var path = node._folderPath; | 599 var path = node._folderPath; |
| 600 var project = node._project; | 600 var project = node._project; |
| 601 | 601 |
| 602 var contextMenu = new WebInspector.ContextMenu(event); | 602 var contextMenu = new WebInspector.ContextMenu(event); |
| 603 | 603 |
| 604 WebInspector.NavigatorView.appendSearchItem(contextMenu, path); | 604 WebInspector.NavigatorView.appendSearchItem(contextMenu, path); |
| 605 contextMenu.appendSeparator(); | 605 contextMenu.appendSeparator(); |
| 606 | 606 |
| 607 if (project && project.type() === WebInspector.projectTypes.FileSystem)
{ | 607 if (project && project.type() === WebInspector.projectTypes.FileSystem)
{ |
| 608 contextMenu.appendItem(WebInspector.UIString.capitalize("Refresh"),
this._handleContextMenuRefresh.bind(this, project, path)); | 608 contextMenu.appendItem(WebInspector.UIString.capitalize("Refresh"),
this._handleContextMenuRefresh.bind(this, project, path)); |
| 609 if (node instanceof WebInspector.NavigatorFolderTreeNode) { | 609 contextMenu.appendItem(WebInspector.UIString.capitalize("New ^file")
, this._handleContextMenuCreate.bind(this, project, path)); |
| 610 contextMenu.appendItem(WebInspector.UIString.capitalize("New ^fi
le"), this._handleContextMenuCreate.bind(this, project, path)); | 610 if (node instanceof WebInspector.NavigatorFolderTreeNode) |
| 611 contextMenu.appendItem(WebInspector.UIString.capitalize("Exclude
^folder"), this._handleContextMenuExclude.bind(this, project, path)); | 611 contextMenu.appendItem(WebInspector.UIString.capitalize("Exclude
^folder"), this._handleContextMenuExclude.bind(this, project, path)); |
| 612 } | |
| 613 } | 612 } |
| 614 contextMenu.appendSeparator(); | 613 contextMenu.appendSeparator(); |
| 615 WebInspector.NavigatorView.appendAddFolderItem(contextMenu); | 614 WebInspector.NavigatorView.appendAddFolderItem(contextMenu); |
| 616 | 615 |
| 617 function removeFolder() | 616 function removeFolder() |
| 618 { | 617 { |
| 619 var shouldRemove = window.confirm(WebInspector.UIString("Are you sur
e you want to remove this folder?")); | 618 var shouldRemove = window.confirm(WebInspector.UIString("Are you sur
e you want to remove this folder?")); |
| 620 if (shouldRemove) | 619 if (shouldRemove) |
| 621 project.remove(); | 620 project.remove(); |
| 622 } | 621 } |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1566 { | 1565 { |
| 1567 if (this._treeElement) | 1566 if (this._treeElement) |
| 1568 return this._treeElement; | 1567 return this._treeElement; |
| 1569 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na
vigatorView, this._type, this._title, this._hoverCallback); | 1568 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na
vigatorView, this._type, this._title, this._hoverCallback); |
| 1570 this._treeElement.setNode(this); | 1569 this._treeElement.setNode(this); |
| 1571 return this._treeElement; | 1570 return this._treeElement; |
| 1572 }, | 1571 }, |
| 1573 | 1572 |
| 1574 __proto__: WebInspector.NavigatorTreeNode.prototype | 1573 __proto__: WebInspector.NavigatorTreeNode.prototype |
| 1575 } | 1574 } |
| OLD | NEW |