| Index: Source/devtools/front_end/SourcesPanel.js
|
| diff --git a/Source/devtools/front_end/ScriptsPanel.js b/Source/devtools/front_end/SourcesPanel.js
|
| similarity index 97%
|
| rename from Source/devtools/front_end/ScriptsPanel.js
|
| rename to Source/devtools/front_end/SourcesPanel.js
|
| index ce36439414a959f644d93fddc46d8ffa97d0a768..4b3d698ebab68b758304a39690134f2e3de51b91 100644
|
| --- a/Source/devtools/front_end/ScriptsPanel.js
|
| +++ b/Source/devtools/front_end/SourcesPanel.js
|
| @@ -34,8 +34,8 @@ importScript("NavigatorOverlayController.js");
|
| importScript("NavigatorView.js");
|
| importScript("RevisionHistoryView.js");
|
| importScript("ScopeChainSidebarPane.js");
|
| -importScript("ScriptsNavigator.js");
|
| -importScript("ScriptsSearchScope.js");
|
| +importScript("SourcesNavigator.js");
|
| +importScript("SourcesSearchScope.js");
|
| importScript("StyleSheetOutlineDialog.js");
|
| importScript("TabbedEditorContainer.js");
|
| importScript("WatchExpressionsSidebarPane.js");
|
| @@ -48,10 +48,10 @@ importScript("WorkersSidebarPane.js");
|
| * @extends {WebInspector.Panel}
|
| * @param {WebInspector.Workspace=} workspaceForTest
|
| */
|
| -WebInspector.ScriptsPanel = function(workspaceForTest)
|
| +WebInspector.SourcesPanel = function(workspaceForTest)
|
| {
|
| - WebInspector.Panel.call(this, "scripts");
|
| - this.registerRequiredCSS("scriptsPanel.css");
|
| + WebInspector.Panel.call(this, "sources");
|
| + this.registerRequiredCSS("sourcesPanel.css");
|
| this.registerRequiredCSS("textPrompt.css"); // Watch Expressions autocomplete.
|
|
|
| WebInspector.settings.navigatorWasOnceHidden = WebInspector.settings.createSetting("navigatorWasOnceHidden", false);
|
| @@ -85,7 +85,7 @@ WebInspector.ScriptsPanel = function(workspaceForTest)
|
| this.editorView.setMainElementConstraints(minimumViewsContainerWidthPercent);
|
| this.editorView.show(this.splitView.mainElement);
|
|
|
| - this._navigator = new WebInspector.ScriptsNavigator();
|
| + this._navigator = new WebInspector.SourcesNavigator();
|
| this._navigator.view.show(this.editorView.sidebarElement);
|
|
|
| var tabbedEditorPlaceholderText = WebInspector.isMac() ? WebInspector.UIString("Hit Cmd+O to open a file") : WebInspector.UIString("Hit Ctrl+O to open a file");
|
| @@ -97,10 +97,10 @@ WebInspector.ScriptsPanel = function(workspaceForTest)
|
|
|
| this._navigatorController = new WebInspector.NavigatorOverlayController(this.editorView, this._navigator.view, this._editorContainer.view);
|
|
|
| - this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.ScriptSelected, this._scriptSelected, this);
|
| - this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.ItemSearchStarted, this._itemSearchStarted, this);
|
| - this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.ItemCreationRequested, this._itemCreationRequested, this);
|
| - this._navigator.addEventListener(WebInspector.ScriptsNavigator.Events.ItemRenamingRequested, this._itemRenamingRequested, this);
|
| + this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.SourceSelected, this._sourceSelected, this);
|
| + this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.ItemSearchStarted, this._itemSearchStarted, this);
|
| + this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.ItemCreationRequested, this._itemCreationRequested, this);
|
| + this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.ItemRenamingRequested, this._itemRenamingRequested, this);
|
|
|
| this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Events.EditorSelected, this._editorSelected, this);
|
| this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Events.EditorClosed, this._editorClosed, this);
|
| @@ -126,8 +126,8 @@ WebInspector.ScriptsPanel = function(workspaceForTest)
|
| }
|
|
|
| this.sidebarPanes.callstack.registerShortcuts(this.registerShortcuts.bind(this));
|
| - this.registerShortcuts(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.GoToMember, this._showOutlineDialog.bind(this));
|
| - this.registerShortcuts(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.ToggleBreakpoint, this._toggleBreakpoint.bind(this));
|
| + this.registerShortcuts(WebInspector.SourcesPanelDescriptor.ShortcutKeys.GoToMember, this._showOutlineDialog.bind(this));
|
| + this.registerShortcuts(WebInspector.SourcesPanelDescriptor.ShortcutKeys.ToggleBreakpoint, this._toggleBreakpoint.bind(this));
|
|
|
| this._toggleFormatSourceButton = new WebInspector.StatusBarButton(WebInspector.UIString("Pretty print"), "scripts-toggle-pretty-print-status-bar-item");
|
| this._toggleFormatSourceButton.toggled = false;
|
| @@ -170,13 +170,13 @@ WebInspector.ScriptsPanel = function(workspaceForTest)
|
| this._workspace.addEventListener(WebInspector.Workspace.Events.ProjectWillReset, this._projectWillReset.bind(this), this);
|
| WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this);
|
|
|
| - WebInspector.advancedSearchController.registerSearchScope(new WebInspector.ScriptsSearchScope(this._workspace));
|
| + WebInspector.advancedSearchController.registerSearchScope(new WebInspector.SourcesSearchScope(this._workspace));
|
|
|
| this._boundOnKeyUp = this._onKeyUp.bind(this);
|
| this._boundOnKeyDown = this._onKeyDown.bind(this);
|
| }
|
|
|
| -WebInspector.ScriptsPanel.prototype = {
|
| +WebInspector.SourcesPanel.prototype = {
|
| get statusBarItems()
|
| {
|
| return [this._toggleFormatSourceButton.element, this._scriptViewStatusBarItemsContainer];
|
| @@ -580,7 +580,7 @@ WebInspector.ScriptsPanel.prototype = {
|
| if (this._currentUISourceCode === uiSourceCode)
|
| delete this._currentUISourceCode;
|
|
|
| - // ScriptsNavigator does not need to update on EditorClosed.
|
| + // SourcesNavigator does not need to update on EditorClosed.
|
| this._updateScriptViewStatusBarItems();
|
| WebInspector.searchController.resetSearch();
|
| },
|
| @@ -595,7 +595,7 @@ WebInspector.ScriptsPanel.prototype = {
|
| WebInspector.searchController.resetSearch();
|
| },
|
|
|
| - _scriptSelected: function(event)
|
| + _sourceSelected: function(event)
|
| {
|
| var uiSourceCode = /** @type {WebInspector.UISourceCode} */ (event.data.uiSourceCode);
|
| var sourceFrame = this._showFile(uiSourceCode);
|
| @@ -876,13 +876,13 @@ WebInspector.ScriptsPanel.prototype = {
|
| // Run snippet.
|
| title = WebInspector.UIString("Run snippet (%s).");
|
| handler = this._runSnippet.bind(this);
|
| - this._runSnippetButton = this._createButtonAndRegisterShortcuts("scripts-run-snippet", title, handler, WebInspector.ScriptsPanelDescriptor.ShortcutKeys.RunSnippet);
|
| + this._runSnippetButton = this._createButtonAndRegisterShortcuts("scripts-run-snippet", title, handler, WebInspector.SourcesPanelDescriptor.ShortcutKeys.RunSnippet);
|
| debugToolbar.appendChild(this._runSnippetButton.element);
|
| this._runSnippetButton.element.addStyleClass("hidden");
|
|
|
| // Continue.
|
| handler = this._togglePause.bind(this);
|
| - this._pauseButton = this._createButtonAndRegisterShortcuts("scripts-pause", "", handler, WebInspector.ScriptsPanelDescriptor.ShortcutKeys.PauseContinue);
|
| + this._pauseButton = this._createButtonAndRegisterShortcuts("scripts-pause", "", handler, WebInspector.SourcesPanelDescriptor.ShortcutKeys.PauseContinue);
|
| debugToolbar.appendChild(this._pauseButton.element);
|
|
|
| // Long resume.
|
| @@ -893,22 +893,22 @@ WebInspector.ScriptsPanel.prototype = {
|
| // Step over.
|
| title = WebInspector.UIString("Step over next function call (%s).");
|
| handler = this._stepOverClicked.bind(this);
|
| - this._stepOverButton = this._createButtonAndRegisterShortcuts("scripts-step-over", title, handler, WebInspector.ScriptsPanelDescriptor.ShortcutKeys.StepOver);
|
| + this._stepOverButton = this._createButtonAndRegisterShortcuts("scripts-step-over", title, handler, WebInspector.SourcesPanelDescriptor.ShortcutKeys.StepOver);
|
| debugToolbar.appendChild(this._stepOverButton.element);
|
|
|
| // Step into.
|
| title = WebInspector.UIString("Step into next function call (%s).");
|
| handler = this._stepIntoClicked.bind(this);
|
| - this._stepIntoButton = this._createButtonAndRegisterShortcuts("scripts-step-into", title, handler, WebInspector.ScriptsPanelDescriptor.ShortcutKeys.StepInto);
|
| + this._stepIntoButton = this._createButtonAndRegisterShortcuts("scripts-step-into", title, handler, WebInspector.SourcesPanelDescriptor.ShortcutKeys.StepInto);
|
| debugToolbar.appendChild(this._stepIntoButton.element);
|
|
|
| // Step into selection (keyboard shortcut only).
|
| - this.registerShortcuts(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.StepIntoSelection, this._stepIntoSelectionClicked.bind(this))
|
| + this.registerShortcuts(WebInspector.SourcesPanelDescriptor.ShortcutKeys.StepIntoSelection, this._stepIntoSelectionClicked.bind(this))
|
|
|
| // Step out.
|
| title = WebInspector.UIString("Step out of current function (%s).");
|
| handler = this._stepOutClicked.bind(this);
|
| - this._stepOutButton = this._createButtonAndRegisterShortcuts("scripts-step-out", title, handler, WebInspector.ScriptsPanelDescriptor.ShortcutKeys.StepOut);
|
| + this._stepOutButton = this._createButtonAndRegisterShortcuts("scripts-step-out", title, handler, WebInspector.SourcesPanelDescriptor.ShortcutKeys.StepOut);
|
| debugToolbar.appendChild(this._stepOutButton.element);
|
|
|
| // Toggle Breakpoints
|
|
|