(options: RTTConsoleDecoderOpts, existing: string | null)
| 144 | } |
| 145 | |
| 146 | protected static createTermName(options: RTTConsoleDecoderOpts, existing: string | null): string { |
| 147 | const suffix = options.type === 'binary' ? `enc:${getBinaryEncoding(options.encoding)}` : options.type; |
| 148 | const orig = options.label || `RTT Ch:${options.port} ${suffix}`; |
| 149 | let ret = orig; |
| 150 | let count = 1; |
| 151 | while (vscode.window.terminals.findIndex((t) => t.name === ret) >= 0) { |
| 152 | if (existing === ret) { |
| 153 | return existing; |
| 154 | } |
| 155 | ret = `${orig}-${count}`; |
| 156 | count++; |
| 157 | } |
| 158 | return ret; |
| 159 | } |
| 160 | |
| 161 | protected terminalClosed() { |
| 162 | this.dispose(); |
no test coverage detected