| 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChang
ed); | 440 this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChang
ed); |
| 441 } | 441 } |
| 442 | 442 |
| 443 _innerResetWorkingCopy() { | 443 _innerResetWorkingCopy() { |
| 444 delete this._workingCopy; | 444 delete this._workingCopy; |
| 445 delete this._workingCopyGetter; | 445 delete this._workingCopyGetter; |
| 446 } | 446 } |
| 447 | 447 |
| 448 /** | 448 /** |
| 449 * @param {string} newWorkingCopy | 449 * @param {string} newWorkingCopy |
| 450 * @param {!Workspace.UISourceCode.SourceMapping=} sourceMapping |
| 450 */ | 451 */ |
| 451 setWorkingCopy(newWorkingCopy) { | 452 setWorkingCopy(newWorkingCopy, sourceMapping) { |
| 452 this._workingCopy = newWorkingCopy; | 453 this._workingCopy = newWorkingCopy; |
| 453 delete this._workingCopyGetter; | 454 delete this._workingCopyGetter; |
| 454 this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChang
ed); | 455 this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChang
ed, {sourceMapping: sourceMapping}); |
| 455 this._project.workspace().dispatchEventToListeners( | 456 this._project.workspace().dispatchEventToListeners( |
| 456 Workspace.Workspace.Events.WorkingCopyChanged, {uiSourceCode: this}); | 457 Workspace.Workspace.Events.WorkingCopyChanged, {uiSourceCode: this}); |
| 457 } | 458 } |
| 458 | 459 |
| 459 setWorkingCopyGetter(workingCopyGetter) { | 460 setWorkingCopyGetter(workingCopyGetter) { |
| 460 this._workingCopyGetter = workingCopyGetter; | 461 this._workingCopyGetter = workingCopyGetter; |
| 461 this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChang
ed); | 462 this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChang
ed); |
| 462 this._project.workspace().dispatchEventToListeners( | 463 this._project.workspace().dispatchEventToListeners( |
| 463 Workspace.Workspace.Events.WorkingCopyChanged, {uiSourceCode: this}); | 464 Workspace.Workspace.Events.WorkingCopyChanged, {uiSourceCode: this}); |
| 464 } | 465 } |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 Workspace.UISourceCodeMetadata = class { | 943 Workspace.UISourceCodeMetadata = class { |
| 943 /** | 944 /** |
| 944 * @param {?Date} modificationTime | 945 * @param {?Date} modificationTime |
| 945 * @param {?number} contentSize | 946 * @param {?number} contentSize |
| 946 */ | 947 */ |
| 947 constructor(modificationTime, contentSize) { | 948 constructor(modificationTime, contentSize) { |
| 948 this.modificationTime = modificationTime; | 949 this.modificationTime = modificationTime; |
| 949 this.contentSize = contentSize; | 950 this.contentSize = contentSize; |
| 950 } | 951 } |
| 951 }; | 952 }; |
| 953 |
| 954 /** |
| 955 * @interface |
| 956 */ |
| 957 Workspace.UISourceCode.SourceMapping = function() {}; |
| 958 |
| 959 Workspace.UISourceCode.SourceMapping.prototype = { |
| 960 /** |
| 961 * @param {number} lineNumber |
| 962 * @param {number=} columnNumber |
| 963 * @return {!Array.<number>} |
| 964 */ |
| 965 originalToFormatted: function(lineNumber, columnNumber) {}, |
| 966 |
| 967 /** |
| 968 * @param {number} lineNumber |
| 969 * @param {number=} columnNumber |
| 970 * @return {!Array.<number>} |
| 971 */ |
| 972 formattedToOriginal: function(lineNumber, columnNumber) {} |
| 973 }; |
| OLD | NEW |