-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Use the same "Jupyter is not installed" message everywhere #16372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,13 @@ | ||
| import { inject, injectable } from 'inversify'; | ||
| import { IApplicationShell, ICommandManager, IJupyterExtensionDependencyManager } from '../common/application/types'; | ||
| import { IJupyterExtensionDependencyManager } from '../common/application/types'; | ||
| import { JUPYTER_EXTENSION_ID } from '../common/constants'; | ||
| import { IExtensions } from '../common/types'; | ||
| import { Common, Jupyter } from '../common/utils/localize'; | ||
|
|
||
| @injectable() | ||
| export class JupyterExtensionDependencyManager implements IJupyterExtensionDependencyManager { | ||
| constructor( | ||
| @inject(IExtensions) private extensions: IExtensions, | ||
| @inject(IApplicationShell) private appShell: IApplicationShell, | ||
| ) {} | ||
| constructor(@inject(IExtensions) private extensions: IExtensions) {} | ||
|
|
||
| public get isJupyterExtensionInstalled(): boolean { | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| return this.extensions.getExtension(JUPYTER_EXTENSION_ID) !== undefined; | ||
| } | ||
|
|
||
| public async installJupyterExtension(commandManager: ICommandManager): Promise<undefined> { | ||
| const yes = Common.bannerLabelYes(); | ||
| const no = Common.bannerLabelNo(); | ||
| const answer = await this.appShell.showErrorMessage(Jupyter.jupyterExtensionRequired(), yes, no); | ||
| if (answer === yes) { | ||
| commandManager.executeCommand('extension.open', JUPYTER_EXTENSION_ID); | ||
| } | ||
| return undefined; | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.