| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 */ | 58 */ |
| 59 this._regexMatchRanges = []; | 59 this._regexMatchRanges = []; |
| 60 | 60 |
| 61 this._clearConsoleButton = new WebInspector.ToolbarButton(WebInspector.UIStr
ing("Clear console log."), "clear-toolbar-item"); | 61 this._clearConsoleButton = new WebInspector.ToolbarButton(WebInspector.UIStr
ing("Clear console log."), "clear-toolbar-item"); |
| 62 this._clearConsoleButton.addEventListener("click", this._requestClearMessage
s, this); | 62 this._clearConsoleButton.addEventListener("click", this._requestClearMessage
s, this); |
| 63 | 63 |
| 64 this._executionContextComboBox = new WebInspector.ToolbarComboBox(null, "con
sole-context"); | 64 this._executionContextComboBox = new WebInspector.ToolbarComboBox(null, "con
sole-context"); |
| 65 this._executionContextComboBox.setMaxWidth(200); | 65 this._executionContextComboBox.setMaxWidth(200); |
| 66 this._executionContextModel = new WebInspector.ExecutionContextModel(this._e
xecutionContextComboBox.selectElement()); | 66 this._executionContextModel = new WebInspector.ExecutionContextModel(this._e
xecutionContextComboBox.selectElement()); |
| 67 | 67 |
| 68 this._selectedLanguageServiceComboBox = new WebInspector.ToolbarComboBox(nul
l, "console-context"); |
| 69 this._selectedLanguageServiceComboBox.setMaxWidth(200); |
| 70 this._languageServiceModel = new WebInspector.LanguageServiceModel(this._sel
ectedLanguageServiceComboBox.selectElement(), [WebInspector.LanguageService.Capa
bilities.Transpile, WebInspector.LanguageService.Capabilities.DebuggerCompletion
s]); |
| 71 |
| 68 this._filter = new WebInspector.ConsoleViewFilter(this); | 72 this._filter = new WebInspector.ConsoleViewFilter(this); |
| 69 this._filter.addEventListener(WebInspector.ConsoleViewFilter.Events.FilterCh
anged, this._updateMessageList.bind(this)); | 73 this._filter.addEventListener(WebInspector.ConsoleViewFilter.Events.FilterCh
anged, this._updateMessageList.bind(this)); |
| 70 | 74 |
| 71 this._filterBar = new WebInspector.FilterBar("consoleView"); | 75 this._filterBar = new WebInspector.FilterBar("consoleView"); |
| 72 | 76 |
| 73 this._preserveLogCheckbox = new WebInspector.ToolbarCheckbox(WebInspector.UI
String("Preserve log"), WebInspector.UIString("Do not clear log on page reload /
navigation."), WebInspector.moduleSetting("preserveConsoleLog")); | 77 this._preserveLogCheckbox = new WebInspector.ToolbarCheckbox(WebInspector.UI
String("Preserve log"), WebInspector.UIString("Do not clear log on page reload /
navigation."), WebInspector.moduleSetting("preserveConsoleLog")); |
| 74 this._progressToolbarItem = new WebInspector.ToolbarItem(createElement("div"
)); | 78 this._progressToolbarItem = new WebInspector.ToolbarItem(createElement("div"
)); |
| 75 | 79 |
| 76 var toolbar = new WebInspector.Toolbar(this._contentsElement); | 80 var toolbar = new WebInspector.Toolbar(this._contentsElement); |
| 77 toolbar.appendToolbarItem(this._clearConsoleButton); | 81 toolbar.appendToolbarItem(this._clearConsoleButton); |
| 78 toolbar.appendToolbarItem(this._filterBar.filterButton()); | 82 toolbar.appendToolbarItem(this._filterBar.filterButton()); |
| 79 toolbar.appendToolbarItem(this._executionContextComboBox); | 83 toolbar.appendToolbarItem(this._executionContextComboBox); |
| 84 toolbar.appendToolbarItem(this._selectedLanguageServiceComboBox); |
| 80 toolbar.appendToolbarItem(this._preserveLogCheckbox); | 85 toolbar.appendToolbarItem(this._preserveLogCheckbox); |
| 81 toolbar.appendToolbarItem(this._progressToolbarItem); | 86 toolbar.appendToolbarItem(this._progressToolbarItem); |
| 82 | 87 |
| 83 this._contentsElement.appendChild(this._filterBar.filtersElement()); | 88 this._contentsElement.appendChild(this._filterBar.filtersElement()); |
| 84 this._filter.addFilters(this._filterBar); | 89 this._filter.addFilters(this._filterBar); |
| 85 | 90 |
| 86 this._viewport = new WebInspector.ViewportControl(this); | 91 this._viewport = new WebInspector.ViewportControl(this); |
| 87 this._viewport.setStickToBottom(true); | 92 this._viewport.setStickToBottom(true); |
| 88 this._viewport.contentElement().classList.add("console-group", "console-grou
p-messages"); | 93 this._viewport.contentElement().classList.add("console-group", "console-grou
p-messages"); |
| 89 this._contentsElement.appendChild(this._viewport.element); | 94 this._contentsElement.appendChild(this._viewport.element); |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 handleAction: function(context, actionId) | 1307 handleAction: function(context, actionId) |
| 1303 { | 1308 { |
| 1304 WebInspector.console.show(); | 1309 WebInspector.console.show(); |
| 1305 } | 1310 } |
| 1306 } | 1311 } |
| 1307 | 1312 |
| 1308 /** | 1313 /** |
| 1309 * @typedef {{messageIndex: number, matchIndex: number}} | 1314 * @typedef {{messageIndex: number, matchIndex: number}} |
| 1310 */ | 1315 */ |
| 1311 WebInspector.ConsoleView.RegexMatchRange; | 1316 WebInspector.ConsoleView.RegexMatchRange; |
| OLD | NEW |