forked from microsoft/vscode-python
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Draft for gather extensibility point (microsoft#13672)
* draft for gather extensibility point * fix compiler errors * add event on extension api * added an event to the api * oops * remove old implementation * fix activation errors * use 3 events instead of 1 * create a class for the execution logger events - part 1 * put the logger into a class * rename logger to notebook extensibility and made it a singleton * oops * fix functional tests * fix more functional tests * remove onNotebookOpened, especify event name as post execute * moved to the datascience part of the API * add news
- Loading branch information
David Kutugata
committed
Sep 11, 2020
1 parent
ed3f29f
commit c9f2d9c
Showing
14 changed files
with
94 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Update API to expose events for cell excecution and kernel restart. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { injectable } from 'inversify'; | ||
import { Event, EventEmitter } from 'vscode'; | ||
import type { NotebookCell } from 'vscode-proposed'; | ||
import { INotebookExtensibility } from './types'; | ||
|
||
@injectable() | ||
export class NotebookExtensibility implements INotebookExtensibility { | ||
private kernelExecute = new EventEmitter<NotebookCell>(); | ||
|
||
private kernelRestart = new EventEmitter<void>(); | ||
|
||
public get onKernelPostExecute(): Event<NotebookCell> { | ||
return this.kernelExecute.event; | ||
} | ||
|
||
public get onKernelRestart(): Event<void> { | ||
return this.kernelRestart.event; | ||
} | ||
|
||
public fireKernelRestart(): void { | ||
this.kernelRestart.fire(); | ||
} | ||
|
||
public fireKernelPostExecute(cell: NotebookCell): void { | ||
this.kernelExecute.fire(cell); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters