| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 var tabbedEditorPlaceholderText = WebInspector.isMac() ? WebInspector.UIStri
ng("Hit Cmd+O to open a file") : WebInspector.UIString("Hit Ctrl+O to open a fil
e"); | 93 var tabbedEditorPlaceholderText = WebInspector.isMac() ? WebInspector.UIStri
ng("Hit Cmd+O to open a file") : WebInspector.UIString("Hit Ctrl+O to open a fil
e"); |
| 94 this._editorContainer = new WebInspector.TabbedEditorContainer(this, "previo
uslyViewedFiles", tabbedEditorPlaceholderText); | 94 this._editorContainer = new WebInspector.TabbedEditorContainer(this, "previo
uslyViewedFiles", tabbedEditorPlaceholderText); |
| 95 this._editorContainer.show(this.editorView.mainElement); | 95 this._editorContainer.show(this.editorView.mainElement); |
| 96 | 96 |
| 97 this._navigatorController = new WebInspector.NavigatorOverlayController(this
.editorView, this._navigator.view, this._editorContainer.view); | 97 this._navigatorController = new WebInspector.NavigatorOverlayController(this
.editorView, this._navigator.view, this._editorContainer.view); |
| 98 | 98 |
| 99 this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.Script
Selected, this._scriptSelected, this); | 99 this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.Script
Selected, this._scriptSelected, this); |
| 100 this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.ItemSe
archStarted, this._itemSearchStarted, this); | 100 this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.ItemSe
archStarted, this._itemSearchStarted, this); |
| 101 this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.Snippe
tCreationRequested, this._snippetCreationRequested, this); | 101 this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.Snippe
tCreationRequested, this._snippetCreationRequested, this); |
| 102 this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.ItemRe
namingRequested, this._itemRenamingRequested, this); | 102 this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.ItemRe
namingRequested, this._itemRenamingRequested, this); |
| 103 this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.FileRe
named, this._fileRenamed, this); | |
| 104 | 103 |
| 105 this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Ev
ents.EditorSelected, this._editorSelected, this); | 104 this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Ev
ents.EditorSelected, this._editorSelected, this); |
| 106 this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Ev
ents.EditorClosed, this._editorClosed, this); | 105 this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Ev
ents.EditorClosed, this._editorClosed, this); |
| 107 | 106 |
| 108 this.splitView.mainElement.appendChild(this.debugSidebarResizeWidgetElement)
; | 107 this.splitView.mainElement.appendChild(this.debugSidebarResizeWidgetElement)
; |
| 109 | 108 |
| 110 this.sidebarPanes = {}; | 109 this.sidebarPanes = {}; |
| 111 this.sidebarPanes.watchExpressions = new WebInspector.WatchExpressionsSideba
rPane(); | 110 this.sidebarPanes.watchExpressions = new WebInspector.WatchExpressionsSideba
rPane(); |
| 112 this.sidebarPanes.callstack = new WebInspector.CallStackSidebarPane(); | 111 this.sidebarPanes.callstack = new WebInspector.CallStackSidebarPane(); |
| 113 this.sidebarPanes.scopechain = new WebInspector.ScopeChainSidebarPane(); | 112 this.sidebarPanes.scopechain = new WebInspector.ScopeChainSidebarPane(); |
| (...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 { | 1049 { |
| 1051 if (this._toggleDebuggerSidebarButton.state === "hidden") | 1050 if (this._toggleDebuggerSidebarButton.state === "hidden") |
| 1052 return; | 1051 return; |
| 1053 this._toggleDebuggerSidebarButton.state = "hidden"; | 1052 this._toggleDebuggerSidebarButton.state = "hidden"; |
| 1054 this._toggleDebuggerSidebarButton.title = WebInspector.UIString("Show de
bugger"); | 1053 this._toggleDebuggerSidebarButton.title = WebInspector.UIString("Show de
bugger"); |
| 1055 this.splitView.hideSidebarElement(); | 1054 this.splitView.hideSidebarElement(); |
| 1056 this.debugSidebarResizeWidgetElement.addStyleClass("hidden"); | 1055 this.debugSidebarResizeWidgetElement.addStyleClass("hidden"); |
| 1057 WebInspector.settings.debuggerSidebarHidden.set(true); | 1056 WebInspector.settings.debuggerSidebarHidden.set(true); |
| 1058 }, | 1057 }, |
| 1059 | 1058 |
| 1060 _fileRenamed: function(event) | |
| 1061 { | |
| 1062 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ (event.data.
uiSourceCode); | |
| 1063 var name = /** @type {string} */ (event.data.name); | |
| 1064 if (uiSourceCode.project().type() !== WebInspector.projectTypes.Snippets
) | |
| 1065 return; | |
| 1066 WebInspector.scriptSnippetModel.renameScriptSnippet(uiSourceCode, name); | |
| 1067 uiSourceCode.rename(name); | |
| 1068 }, | |
| 1069 | |
| 1070 /** | 1059 /** |
| 1071 * @param {WebInspector.Event} event | 1060 * @param {WebInspector.Event} event |
| 1072 */ | 1061 */ |
| 1073 _snippetCreationRequested: function(event) | 1062 _snippetCreationRequested: function(event) |
| 1074 { | 1063 { |
| 1075 var uiSourceCode = WebInspector.scriptSnippetModel.createScriptSnippet()
; | 1064 var uiSourceCode = WebInspector.scriptSnippetModel.createScriptSnippet()
; |
| 1076 this._showSourceLine(uiSourceCode); | 1065 this._showSourceLine(uiSourceCode); |
| 1077 | 1066 |
| 1078 var shouldHideNavigator = !this._navigatorController.isNavigatorPinned()
; | 1067 var shouldHideNavigator = !this._navigatorController.isNavigatorPinned()
; |
| 1079 if (this._navigatorController.isNavigatorHidden()) | 1068 if (this._navigatorController.isNavigatorHidden()) |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1321 this.sidebarPanes.scopechain.expand(); | 1310 this.sidebarPanes.scopechain.expand(); |
| 1322 this.sidebarPanes.jsBreakpoints.expand(); | 1311 this.sidebarPanes.jsBreakpoints.expand(); |
| 1323 this.sidebarPanes.callstack.expand(); | 1312 this.sidebarPanes.callstack.expand(); |
| 1324 | 1313 |
| 1325 if (WebInspector.settings.watchExpressions.get().length > 0) | 1314 if (WebInspector.settings.watchExpressions.get().length > 0) |
| 1326 this.sidebarPanes.watchExpressions.expand(); | 1315 this.sidebarPanes.watchExpressions.expand(); |
| 1327 }, | 1316 }, |
| 1328 | 1317 |
| 1329 __proto__: WebInspector.Panel.prototype | 1318 __proto__: WebInspector.Panel.prototype |
| 1330 } | 1319 } |
| OLD | NEW |