|
Lines 33-69
WI.TextEditor = class TextEditor extends WI.View
a/Source/WebInspectorUI/UserInterface/Views/TextEditor.js_sec1
|
| 33 |
|
33 |
|
| 34 |
this._codeMirror = WI.CodeMirrorEditor.create(this.element, { |
34 |
this._codeMirror = WI.CodeMirrorEditor.create(this.element, { |
| 35 |
readOnly: true, |
35 |
readOnly: true, |
| 36 |
indentWithTabs: WI.settings.indentWithTabs.value, |
|
|
| 37 |
indentUnit: WI.settings.indentUnit.value, |
| 38 |
tabSize: WI.settings.tabSize.value, |
| 39 |
lineNumbers: true, |
36 |
lineNumbers: true, |
| 40 |
lineWrapping: WI.settings.enableLineWrapping.value, |
|
|
| 41 |
matchBrackets: true, |
37 |
matchBrackets: true, |
| 42 |
autoCloseBrackets: true, |
38 |
autoCloseBrackets: true, |
| 43 |
showWhitespaceCharacters: WI.settings.showWhitespaceCharacters.value, |
|
|
| 44 |
styleSelectedText: true, |
39 |
styleSelectedText: true, |
| 45 |
}); |
40 |
}); |
| 46 |
|
41 |
|
| 47 |
WI.settings.indentWithTabs.addEventListener(WI.Setting.Event.Changed, (event) => { |
|
|
| 48 |
this._codeMirror.setOption("indentWithTabs", WI.settings.indentWithTabs.value); |
| 49 |
}); |
| 50 |
|
| 51 |
WI.settings.indentUnit.addEventListener(WI.Setting.Event.Changed, (event) => { |
| 52 |
this._codeMirror.setOption("indentUnit", WI.settings.indentUnit.value); |
| 53 |
}); |
| 54 |
|
| 55 |
WI.settings.tabSize.addEventListener(WI.Setting.Event.Changed, (event) => { |
| 56 |
this._codeMirror.setOption("tabSize", WI.settings.tabSize.value); |
| 57 |
}); |
| 58 |
|
| 59 |
WI.settings.enableLineWrapping.addEventListener(WI.Setting.Event.Changed, (event) => { |
| 60 |
this._codeMirror.setOption("lineWrapping", WI.settings.enableLineWrapping.value); |
| 61 |
}); |
| 62 |
|
| 63 |
WI.settings.showWhitespaceCharacters.addEventListener(WI.Setting.Event.Changed, (event) => { |
| 64 |
this._codeMirror.setOption("showWhitespaceCharacters", WI.settings.showWhitespaceCharacters.value); |
| 65 |
}); |
| 66 |
|
| 67 |
this._codeMirror.on("focus", this._editorFocused.bind(this)); |
42 |
this._codeMirror.on("focus", this._editorFocused.bind(this)); |
| 68 |
this._codeMirror.on("change", this._contentChanged.bind(this)); |
43 |
this._codeMirror.on("change", this._contentChanged.bind(this)); |
| 69 |
this._codeMirror.on("gutterClick", this._gutterMouseDown.bind(this)); |
44 |
this._codeMirror.on("gutterClick", this._gutterMouseDown.bind(this)); |
|
Lines 587-601
WI.TextEditor = class TextEditor extends WI.View
a/Source/WebInspectorUI/UserInterface/Views/TextEditor.js_sec2
|
| 587 |
this._visible = false; |
562 |
this._visible = false; |
| 588 |
} |
563 |
} |
| 589 |
|
564 |
|
| 590 |
close() |
|
|
| 591 |
{ |
| 592 |
WI.settings.indentWithTabs.removeEventListener(null, null, this); |
| 593 |
WI.settings.indentUnit.removeEventListener(null, null, this); |
| 594 |
WI.settings.tabSize.removeEventListener(null, null, this); |
| 595 |
WI.settings.enableLineWrapping.removeEventListener(null, null, this); |
| 596 |
WI.settings.showWhitespaceCharacters.removeEventListener(null, null, this); |
| 597 |
} |
| 598 |
|
| 599 |
setBreakpointInfoForLineAndColumn(lineNumber, columnNumber, breakpointInfo) |
565 |
setBreakpointInfoForLineAndColumn(lineNumber, columnNumber, breakpointInfo) |
| 600 |
{ |
566 |
{ |
| 601 |
if (this._ignoreSetBreakpointInfoCalls) |
567 |
if (this._ignoreSetBreakpointInfoCalls) |