Enable VS Code extension event APIs for when editors become active or visible. (#18129)

This commit is contained in:
Cory Rivera
2022-01-20 11:04:27 -08:00
committed by GitHub
parent 251901fee7
commit 470afe2e8a
2 changed files with 15 additions and 14 deletions

View File

@@ -724,22 +724,16 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor, ex
return new VSCodeNotebookEditor(extHostNotebookDocumentsAndEditors.getActiveEditor());
},
onDidChangeActiveNotebookEditor(listener, thisArgs?, disposables?) {
// {{SQL CARBON EDIT}} Disable VS Code notebooks
throw new Error(functionalityNotSupportedError);
// checkProposedApiEnabled(extension);
// return extHostNotebook.onDidChangeActiveNotebookEditor(listener, thisArgs, disposables);
// {{SQL CARBON EDIT}} Use our own notebooks
return extHostNotebookDocumentsAndEditors.onDidChangeActiveVSCodeEditor(listener, thisArgs, disposables);
},
get visibleNotebookEditors() {
// {{SQL CARBON EDIT}} Disable VS Code notebooks
return undefined;
// checkProposedApiEnabled(extension);
// return extHostNotebook.visibleNotebookEditors;
// {{SQL CARBON EDIT}} Use our own notebooks
return extHostNotebookDocumentsAndEditors.getAllEditors().map(editor => new VSCodeNotebookEditor(editor));
},
get onDidChangeVisibleNotebookEditors() {
// {{SQL CARBON EDIT}} Disable VS Code notebooks
return undefined;
// checkProposedApiEnabled(extension);
// return extHostNotebook.onDidChangeVisibleNotebookEditors;
// {{SQL CARBON EDIT}} Use our own notebooks
return extHostNotebookDocumentsAndEditors.onDidChangeVisibleVSCodeEditors;
},
onDidChangeNotebookEditorSelection(listener, thisArgs?, disposables?) {
// {{SQL CARBON EDIT}} Disable VS Code notebooks