(id: number, flow: MessageWithLocation[])
| 1801 | } |
| 1802 | |
| 1803 | onEditorDisplayFlow(id: number, flow: MessageWithLocation[]): void { |
| 1804 | if (Number(id) === this.id) { |
| 1805 | if (this.decorations.flows?.length) { |
| 1806 | this.decorations.flows = []; |
| 1807 | } else { |
| 1808 | this.decorations.flows = flow.map((ri, ind) => { |
| 1809 | return { |
| 1810 | range: new monaco.Range( |
| 1811 | ri.line ?? 0, |
| 1812 | ri.column ?? 0, |
| 1813 | (ri.endline || ri.line) ?? 0, |
| 1814 | (ri.endcolumn || ri.column) ?? 0, |
| 1815 | ), |
| 1816 | options: { |
| 1817 | before: { |
| 1818 | content: ' ' + (ind + 1).toString() + ' ', |
| 1819 | inlineClassName: 'flow-decoration', |
| 1820 | cursorStops: monaco.editor.InjectedTextCursorStops.None, |
| 1821 | }, |
| 1822 | inlineClassName: 'flow-highlight', |
| 1823 | isWholeLine: false, |
| 1824 | hoverMessage: {value: ri.text}, |
| 1825 | }, |
| 1826 | }; |
| 1827 | }); |
| 1828 | } |
| 1829 | this.updateDecorations(); |
| 1830 | } |
| 1831 | } |
| 1832 | |
| 1833 | updateDecorations(): void { |
| 1834 | this.prevDecorations = this.editor.deltaDecorations( |
nothing calls this directly
no test coverage detected