@@ -22,7 +22,7 @@ import type { KeyValueStore } from "./types/KeyValueStore";
2222import type { Messages } from "./types/Messages" ;
2323import type { QuickPickOptions } from "./types/QuickPickOptions" ;
2424
25- export default class PassthroughIDEBase implements IDE {
25+ export class PassthroughIDE implements IDE {
2626 configuration : Configuration ;
2727 keyValueStore : KeyValueStore ;
2828 clipboard : Clipboard ;
@@ -37,6 +37,15 @@ export default class PassthroughIDEBase implements IDE {
3737 this . capabilities = original . capabilities ;
3838 }
3939
40+ setIde ( original : IDE ) {
41+ this . original = original ;
42+ this . configuration = original . configuration ;
43+ this . keyValueStore = original . keyValueStore ;
44+ this . clipboard = original . clipboard ;
45+ this . messages = original . messages ;
46+ this . capabilities = original . capabilities ;
47+ }
48+
4049 flashRanges ( flashDescriptors : FlashDescriptor [ ] ) : Promise < void > {
4150 return this . original . flashRanges ( flashDescriptors ) ;
4251 }
@@ -112,76 +121,76 @@ export default class PassthroughIDEBase implements IDE {
112121 ) ;
113122 }
114123
115- public get activeTextEditor ( ) : TextEditor | undefined {
124+ get activeTextEditor ( ) : TextEditor | undefined {
116125 return this . original . activeTextEditor ;
117126 }
118127
119- public get activeEditableTextEditor ( ) : EditableTextEditor | undefined {
128+ get activeEditableTextEditor ( ) : EditableTextEditor | undefined {
120129 return this . original . activeEditableTextEditor ;
121130 }
122131
123- public get visibleTextEditors ( ) : TextEditor [ ] {
132+ get visibleTextEditors ( ) : TextEditor [ ] {
124133 return this . original . visibleTextEditors ;
125134 }
126135
127- public get visibleNotebookEditors ( ) : NotebookEditor [ ] {
136+ get visibleNotebookEditors ( ) : NotebookEditor [ ] {
128137 return this . original . visibleNotebookEditors ;
129138 }
130139
131- public get cursorlessVersion ( ) : string {
140+ get cursorlessVersion ( ) : string {
132141 return this . original . cursorlessVersion ;
133142 }
134143
135- public get assetsRoot ( ) : string {
144+ get assetsRoot ( ) : string {
136145 return this . original . assetsRoot ;
137146 }
138147
139- public get runMode ( ) : RunMode {
148+ get runMode ( ) : RunMode {
140149 return this . original . runMode ;
141150 }
142151
143- public get workspaceFolders ( ) : readonly WorkspaceFolder [ ] | undefined {
152+ get workspaceFolders ( ) : readonly WorkspaceFolder [ ] | undefined {
144153 return this . original . workspaceFolders ;
145154 }
146155
147- public findInDocument ( query : string , editor ?: TextEditor ) : Promise < void > {
156+ findInDocument ( query : string , editor ?: TextEditor ) : Promise < void > {
148157 return this . original . findInDocument ( query , editor ) ;
149158 }
150159
151- public findInWorkspace ( query : string ) : Promise < void > {
160+ findInWorkspace ( query : string ) : Promise < void > {
152161 return this . original . findInWorkspace ( query ) ;
153162 }
154163
155- public openTextDocument ( path : string ) : Promise < TextEditor > {
164+ openTextDocument ( path : string ) : Promise < TextEditor > {
156165 return this . original . openTextDocument ( path ) ;
157166 }
158167
159- public openUntitledTextDocument (
168+ openUntitledTextDocument (
160169 options ?: OpenUntitledTextDocumentOptions ,
161170 ) : Promise < TextEditor > {
162171 return this . original . openUntitledTextDocument ( options ) ;
163172 }
164173
165- public showQuickPick (
174+ showQuickPick (
166175 items : readonly string [ ] ,
167176 options ?: QuickPickOptions ,
168177 ) : Promise < string | undefined > {
169178 return this . original . showQuickPick ( items , options ) ;
170179 }
171180
172- public showInputBox ( options ?: any ) : Promise < string | undefined > {
181+ showInputBox ( options ?: any ) : Promise < string | undefined > {
173182 return this . original . showInputBox ( options ) ;
174183 }
175184
176- public getEditableTextEditor ( editor : TextEditor ) : EditableTextEditor {
185+ getEditableTextEditor ( editor : TextEditor ) : EditableTextEditor {
177186 return this . original . getEditableTextEditor ( editor ) ;
178187 }
179188
180189 executeCommand < T > ( command : string , ...args : any [ ] ) : Promise < T | undefined > {
181190 return this . original . executeCommand ( command , ...args ) ;
182191 }
183192
184- public onDidChangeTextDocument (
193+ onDidChangeTextDocument (
185194 listener : ( event : TextDocumentChangeEvent ) => void ,
186195 ) : Disposable {
187196 return this . original . onDidChangeTextDocument ( listener ) ;
0 commit comments