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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 { | 386 { |
387 var warningLevel = WebInspector.Console.MessageLevel.Warning; | 387 var warningLevel = WebInspector.Console.MessageLevel.Warning; |
388 if (!errorData) { | 388 if (!errorData) { |
389 if (error) | 389 if (error) |
390 WebInspector.console.addMessage(WebInspector.UIString("LiveE
dit failed: %s", error), warningLevel); | 390 WebInspector.console.addMessage(WebInspector.UIString("LiveE
dit failed: %s", error), warningLevel); |
391 return; | 391 return; |
392 } | 392 } |
393 var compileError = errorData.compileError; | 393 var compileError = errorData.compileError; |
394 if (compileError) { | 394 if (compileError) { |
395 var messageText = WebInspector.UIString("LiveEdit compile failed
: %s", compileError.message); | 395 var messageText = WebInspector.UIString("LiveEdit compile failed
: %s", compileError.message); |
396 var message = new WebInspector.SourceFrameMessage(messageText, W
ebInspector.SourceFrameMessage.Level.Error, compileError.lineNumber - 1, compile
Error.columnNumber + 1); | 396 var startLine = compileError.lineNumber - 1; |
| 397 var endLine = compileError.columnNumber + 1; |
| 398 var location = new WebInspector.TextRange(startLine, endLine, st
artLine, endLine); |
| 399 var message = new WebInspector.SourceFrameMessage(messageText, W
ebInspector.UISourceCodeMessage.Level.Error, location); |
397 this.addMessageToSource(message); | 400 this.addMessageToSource(message); |
398 } else { | 401 } else { |
399 WebInspector.console.addMessage(WebInspector.UIString("Unknown L
iveEdit error: %s; %s", JSON.stringify(errorData), error), warningLevel); | 402 WebInspector.console.addMessage(WebInspector.UIString("Unknown L
iveEdit error: %s; %s", JSON.stringify(errorData), error), warningLevel); |
400 } | 403 } |
401 } | 404 } |
402 | 405 |
403 this._scriptsPanel.setIgnoreExecutionLineEvents(true); | 406 this._scriptsPanel.setIgnoreExecutionLineEvents(true); |
404 this._hasCommittedLiveEdit = true; | 407 this._hasCommittedLiveEdit = true; |
405 var scriptFiles = this._scriptFileForTarget.valuesArray(); | 408 var scriptFiles = this._scriptFileForTarget.valuesArray(); |
406 for (var i = 0; i < scriptFiles.length; ++i) | 409 for (var i = 0; i < scriptFiles.length; ++i) |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyChanged, this._workingCopyChanged, this); | 1128 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyChanged, this._workingCopyChanged, this); |
1126 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyCommitted, this._workingCopyCommitted, this); | 1129 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyCommitted, this._workingCopyCommitted, this); |
1127 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
TitleChanged, this._showBlackboxInfobarIfNeeded, this); | 1130 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
TitleChanged, this._showBlackboxInfobarIfNeeded, this); |
1128 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene
r(this._showBlackboxInfobarIfNeeded, this); | 1131 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene
r(this._showBlackboxInfobarIfNeeded, this); |
1129 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th
is._showBlackboxInfobarIfNeeded, this); | 1132 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th
is._showBlackboxInfobarIfNeeded, this); |
1130 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); | 1133 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); |
1131 }, | 1134 }, |
1132 | 1135 |
1133 __proto__: WebInspector.UISourceCodeFrame.prototype | 1136 __proto__: WebInspector.UISourceCodeFrame.prototype |
1134 } | 1137 } |
OLD | NEW |