Implements a starting tab reading API (#131998)

* Clean up proposed.d.ts

* More API Polish

* Allow resource to be undefined

* Fix hygiene

* Address feedback

* Remove unnecessary iteration

* Use index from map
This commit is contained in:
Logan Ramos
2021-09-02 10:48:38 -04:00
committed by GitHub
parent 45a1f368f0
commit c2d0a69f87
5 changed files with 97 additions and 38 deletions

View File

@@ -731,14 +731,22 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
checkProposedApiEnabled(extension);
return extHostUriOpeners.registerExternalUriOpener(extension.identifier, id, opener, metadata);
},
get openEditors() {
get tabs() {
checkProposedApiEnabled(extension);
return extHostEditorTabs.tabs;
},
get onDidChangeOpenEditors() {
get activeTab() {
checkProposedApiEnabled(extension);
return extHostEditorTabs.activeTab;
},
get onDidChangeTabs() {
checkProposedApiEnabled(extension);
return extHostEditorTabs.onDidChangeTabs;
},
get onDidChangeActiveTab() {
checkProposedApiEnabled(extension);
return extHostEditorTabs.onDidChangeActiveTab;
},
getInlineCompletionItemController<T extends vscode.InlineCompletionItem>(provider: vscode.InlineCompletionItemProvider<T>): vscode.InlineCompletionController<T> {
checkProposedApiEnabled(extension);
return InlineCompletionController.get(provider);