OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 * @param {?Event} event | 883 * @param {?Event} event |
884 * @param {!WebInspector.ContextMenu} contextMenu | 884 * @param {!WebInspector.ContextMenu} contextMenu |
885 * @param {!Object} target | 885 * @param {!Object} target |
886 */ | 886 */ |
887 _appendUISourceCodeItems: function(event, contextMenu, target) | 887 _appendUISourceCodeItems: function(event, contextMenu, target) |
888 { | 888 { |
889 if (!(target instanceof WebInspector.UISourceCode)) | 889 if (!(target instanceof WebInspector.UISourceCode)) |
890 return; | 890 return; |
891 | 891 |
892 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (target); | 892 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (target); |
893 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe
nuTitles() ? "Local modifications\u2026" : "Local Modifications\u2026"), this._s
howLocalHistory.bind(this, uiSourceCode)); | 893 var project = uiSourceCode.project(); |
| 894 if (project.type() !== WebInspector.projectTypes.FileSystem) |
| 895 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCa
seMenuTitles() ? "Local modifications\u2026" : "Local Modifications\u2026"), thi
s._showLocalHistory.bind(this, uiSourceCode)); |
894 this._appendUISourceCodeMappingItems(contextMenu, uiSourceCode); | 896 this._appendUISourceCodeMappingItems(contextMenu, uiSourceCode); |
895 | 897 |
896 if (!event.target.isSelfOrDescendant(this.editorView.sidebarElement()))
{ | 898 if (!event.target.isSelfOrDescendant(this.editorView.sidebarElement()))
{ |
897 contextMenu.appendSeparator(); | 899 contextMenu.appendSeparator(); |
898 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCa
seMenuTitles() ? "Reveal in navigator" : "Reveal in Navigator"), this._handleCon
textMenuReveal.bind(this, uiSourceCode)); | 900 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCa
seMenuTitles() ? "Reveal in navigator" : "Reveal in Navigator"), this._handleCon
textMenuReveal.bind(this, uiSourceCode)); |
899 } | 901 } |
900 }, | 902 }, |
901 | 903 |
902 /** | 904 /** |
903 * @param {!WebInspector.UISourceCode} uiSourceCode | 905 * @param {!WebInspector.UISourceCode} uiSourceCode |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 WebInspector.SourcesPanel.TogglePauseActionDelegate.prototype = { | 1411 WebInspector.SourcesPanel.TogglePauseActionDelegate.prototype = { |
1410 /** | 1412 /** |
1411 * @return {boolean} | 1413 * @return {boolean} |
1412 */ | 1414 */ |
1413 handleAction: function() | 1415 handleAction: function() |
1414 { | 1416 { |
1415 /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorView.sh
owPanel("sources")).togglePause(); | 1417 /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorView.sh
owPanel("sources")).togglePause(); |
1416 return true; | 1418 return true; |
1417 } | 1419 } |
1418 } | 1420 } |
OLD | NEW |