OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 this._popoverHelper = new WebInspector.ObjectPopoverHelper(this.textEditor.e
lement, | 47 this._popoverHelper = new WebInspector.ObjectPopoverHelper(this.textEditor.e
lement, |
48 this._getPopoverAnchor.bind(this), this._resolveObjectForPopover.bind(th
is), this._onHidePopover.bind(this), true); | 48 this._getPopoverAnchor.bind(this), this._resolveObjectForPopover.bind(th
is), this._onHidePopover.bind(this), true); |
49 | 49 |
50 this.textEditor.element.addEventListener("keydown", this._onKeyDown.bind(thi
s), true); | 50 this.textEditor.element.addEventListener("keydown", this._onKeyDown.bind(thi
s), true); |
51 | 51 |
52 this.textEditor.addEventListener(WebInspector.TextEditor.Events.GutterClick,
this._handleGutterClick.bind(this), this); | 52 this.textEditor.addEventListener(WebInspector.TextEditor.Events.GutterClick,
this._handleGutterClick.bind(this), this); |
53 | 53 |
54 this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Even
ts.BreakpointAdded, this._breakpointAdded, this); | 54 this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Even
ts.BreakpointAdded, this._breakpointAdded, this); |
55 this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Even
ts.BreakpointRemoved, this._breakpointRemoved, this); | 55 this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Even
ts.BreakpointRemoved, this._breakpointRemoved, this); |
56 | 56 |
57 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Console
MessageAdded, this._consoleMessageAdded, this); | 57 WebInspector.presentationConsoleMessageHelper.addConsoleMessageEventListener
(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageAdded, this.
_uiSourceCode, this._consoleMessageAdded, this); |
58 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Console
MessageRemoved, this._consoleMessageRemoved, this); | 58 WebInspector.presentationConsoleMessageHelper.addConsoleMessageEventListener
(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageRemoved, thi
s._uiSourceCode, this._consoleMessageRemoved, this); |
59 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Console
MessagesCleared, this._consoleMessagesCleared, this); | 59 WebInspector.presentationConsoleMessageHelper.addConsoleMessageEventListener
(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessagesCleared, th
is._uiSourceCode, this._consoleMessagesCleared, this); |
60 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.SourceM
appingChanged, this._onSourceMappingChanged, this); | 60 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.SourceM
appingChanged, this._onSourceMappingChanged, this); |
61 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyChanged, this._workingCopyChanged, this); | 61 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyChanged, this._workingCopyChanged, this); |
62 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyCommitted, this._workingCopyCommitted, this); | 62 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working
CopyCommitted, this._workingCopyCommitted, this); |
63 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.TitleCh
anged, this._showBlackboxInfobarIfNeeded, this); | 63 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.TitleCh
anged, this._showBlackboxInfobarIfNeeded, this); |
64 | 64 |
65 /** @type {!Map.<!WebInspector.Target, !WebInspector.ResourceScriptFile>}*/ | 65 /** @type {!Map.<!WebInspector.Target, !WebInspector.ResourceScriptFile>}*/ |
66 this._scriptFileForTarget = new Map(); | 66 this._scriptFileForTarget = new Map(); |
67 this._registerShortcuts(); | 67 this._registerShortcuts(); |
68 var targets = WebInspector.targetManager.targets(); | 68 var targets = WebInspector.targetManager.targets(); |
69 for (var i = 0; i < targets.length; ++i) { | 69 for (var i = 0; i < targets.length; ++i) { |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 | 802 |
803 onTextEditorContentLoaded: function() | 803 onTextEditorContentLoaded: function() |
804 { | 804 { |
805 if (typeof this._executionLineNumber === "number") | 805 if (typeof this._executionLineNumber === "number") |
806 this.setExecutionLine(this._executionLineNumber); | 806 this.setExecutionLine(this._executionLineNumber); |
807 | 807 |
808 var breakpointLocations = this._breakpointManager.breakpointLocationsFor
UISourceCode(this._uiSourceCode); | 808 var breakpointLocations = this._breakpointManager.breakpointLocationsFor
UISourceCode(this._uiSourceCode); |
809 for (var i = 0; i < breakpointLocations.length; ++i) | 809 for (var i = 0; i < breakpointLocations.length; ++i) |
810 this._breakpointAdded({data:breakpointLocations[i]}); | 810 this._breakpointAdded({data:breakpointLocations[i]}); |
811 | 811 |
812 var messages = this._uiSourceCode.consoleMessages(); | 812 var messages = WebInspector.presentationConsoleMessageHelper.consoleMess
ages(this._uiSourceCode); |
813 for (var i = 0; i < messages.length; ++i) { | 813 for (var i = 0; i < messages.length; ++i) { |
814 var message = messages[i]; | 814 var message = messages[i]; |
815 this.addMessageToSource(message.lineNumber, message.originalMessage)
; | 815 this.addMessageToSource(message.lineNumber, message.originalMessage)
; |
816 } | 816 } |
817 | 817 |
818 var scriptFiles = this._scriptFileForTarget.values(); | 818 var scriptFiles = this._scriptFileForTarget.values(); |
819 for (var i = 0; i < scriptFiles.length; ++i) | 819 for (var i = 0; i < scriptFiles.length; ++i) |
820 scriptFiles[i].checkMapping(); | 820 scriptFiles[i].checkMapping(); |
821 | 821 |
822 this._updateLinesWithoutMappingHighlight(); | 822 this._updateLinesWithoutMappingHighlight(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 var rawLocation = WebInspector.debuggerWorkspaceBinding.uiLocationToRawL
ocation(executionContext.target(), this._uiSourceCode, lineNumber, 0); | 897 var rawLocation = WebInspector.debuggerWorkspaceBinding.uiLocationToRawL
ocation(executionContext.target(), this._uiSourceCode, lineNumber, 0); |
898 if (!rawLocation) | 898 if (!rawLocation) |
899 return; | 899 return; |
900 this._scriptsPanel.continueToLocation(rawLocation); | 900 this._scriptsPanel.continueToLocation(rawLocation); |
901 }, | 901 }, |
902 | 902 |
903 dispose: function() | 903 dispose: function() |
904 { | 904 { |
905 this._breakpointManager.removeEventListener(WebInspector.BreakpointManag
er.Events.BreakpointAdded, this._breakpointAdded, this); | 905 this._breakpointManager.removeEventListener(WebInspector.BreakpointManag
er.Events.BreakpointAdded, this._breakpointAdded, this); |
906 this._breakpointManager.removeEventListener(WebInspector.BreakpointManag
er.Events.BreakpointRemoved, this._breakpointRemoved, this); | 906 this._breakpointManager.removeEventListener(WebInspector.BreakpointManag
er.Events.BreakpointRemoved, this._breakpointRemoved, this); |
907 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
ConsoleMessageAdded, this._consoleMessageAdded, this); | 907 WebInspector.presentationConsoleMessageHelper.removeConsoleMessageEventL
istener(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageAdded
, this._uiSourceCode, this._consoleMessageAdded, this); |
908 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
ConsoleMessageRemoved, this._consoleMessageRemoved, this); | 908 WebInspector.presentationConsoleMessageHelper.removeConsoleMessageEventL
istener(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessageRemov
ed, this._uiSourceCode, this._consoleMessageRemoved, this); |
909 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
ConsoleMessagesCleared, this._consoleMessagesCleared, this); | 909 WebInspector.presentationConsoleMessageHelper.removeConsoleMessageEventL
istener(WebInspector.PresentationConsoleMessageHelper.Events.ConsoleMessagesClea
red, this._uiSourceCode, this._consoleMessagesCleared, this); |
910 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
SourceMappingChanged, this._onSourceMappingChanged, this); | 910 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
SourceMappingChanged, this._onSourceMappingChanged, this); |
911 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyChanged, this._workingCopyChanged, this); | 911 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyChanged, this._workingCopyChanged, this); |
912 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyCommitted, this._workingCopyCommitted, this); | 912 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyCommitted, this._workingCopyCommitted, this); |
913 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
TitleChanged, this._showBlackboxInfobarIfNeeded, this); | 913 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
TitleChanged, this._showBlackboxInfobarIfNeeded, this); |
914 WebInspector.settings.skipStackFramesPattern.removeChangeListener(this._
showBlackboxInfobarIfNeeded, this); | 914 WebInspector.settings.skipStackFramesPattern.removeChangeListener(this._
showBlackboxInfobarIfNeeded, this); |
915 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); | 915 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); |
916 }, | 916 }, |
917 | 917 |
918 __proto__: WebInspector.UISourceCodeFrame.prototype | 918 __proto__: WebInspector.UISourceCodeFrame.prototype |
919 } | 919 } |
OLD | NEW |