| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 25 matching lines...) Expand all Loading... |
| 36 * @param {!Sources.SourcesView} sourcesView | 36 * @param {!Sources.SourcesView} sourcesView |
| 37 * @param {function():?SourceFrame.SourceFrame} currentSourceFrameCallback | 37 * @param {function():?SourceFrame.SourceFrame} currentSourceFrameCallback |
| 38 */ | 38 */ |
| 39 constructor(sourcesView, currentSourceFrameCallback) { | 39 constructor(sourcesView, currentSourceFrameCallback) { |
| 40 this._sourcesView = sourcesView; | 40 this._sourcesView = sourcesView; |
| 41 this._historyManager = new Sources.SimpleHistoryManager(Sources.EditingLocat
ionHistoryManager.HistoryDepth); | 41 this._historyManager = new Sources.SimpleHistoryManager(Sources.EditingLocat
ionHistoryManager.HistoryDepth); |
| 42 this._currentSourceFrameCallback = currentSourceFrameCallback; | 42 this._currentSourceFrameCallback = currentSourceFrameCallback; |
| 43 } | 43 } |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * @param {!Sources.UISourceCodeFrame} sourceFrame | 46 * @param {!SourceFrame.UISourceCodeFrame} sourceFrame |
| 47 */ | 47 */ |
| 48 trackSourceFrameCursorJumps(sourceFrame) { | 48 trackSourceFrameCursorJumps(sourceFrame) { |
| 49 sourceFrame.textEditor.addEventListener( | 49 sourceFrame.textEditor.addEventListener( |
| 50 SourceFrame.SourcesTextEditor.Events.JumpHappened, this._onJumpHappened.
bind(this)); | 50 SourceFrame.SourcesTextEditor.Events.JumpHappened, this._onJumpHappened.
bind(this)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 /** | 53 /** |
| 54 * @param {!Common.Event} event | 54 * @param {!Common.Event} event |
| 55 */ | 55 */ |
| 56 _onJumpHappened(event) { | 56 _onJumpHappened(event) { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 reveal() { | 176 reveal() { |
| 177 var position = this._positionHandle.resolve(); | 177 var position = this._positionHandle.resolve(); |
| 178 var uiSourceCode = Workspace.workspace.uiSourceCode(this._projectId, this._u
rl); | 178 var uiSourceCode = Workspace.workspace.uiSourceCode(this._projectId, this._u
rl); |
| 179 if (!position || !uiSourceCode) | 179 if (!position || !uiSourceCode) |
| 180 return; | 180 return; |
| 181 | 181 |
| 182 this._editingLocationManager.updateCurrentState(); | 182 this._editingLocationManager.updateCurrentState(); |
| 183 this._sourcesView.showSourceLocation(uiSourceCode, position.lineNumber, posi
tion.columnNumber); | 183 this._sourcesView.showSourceLocation(uiSourceCode, position.lineNumber, posi
tion.columnNumber); |
| 184 } | 184 } |
| 185 }; | 185 }; |
| OLD | NEW |