|
@@ -2,10 +2,10 @@
|
|
// Distributed under the terms of the Modified BSD License.
|
|
// Distributed under the terms of the Modified BSD License.
|
|
|
|
|
|
import {
|
|
import {
|
|
|
|
+ ILabShell,
|
|
ILayoutRestorer,
|
|
ILayoutRestorer,
|
|
JupyterFrontEnd,
|
|
JupyterFrontEnd,
|
|
- JupyterFrontEndPlugin,
|
|
|
|
- ILabShell
|
|
|
|
|
|
+ JupyterFrontEndPlugin
|
|
} from '@jupyterlab/application';
|
|
} from '@jupyterlab/application';
|
|
|
|
|
|
import {
|
|
import {
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
|
|
|
import { IEditorServices } from '@jupyterlab/codeeditor';
|
|
import { IEditorServices } from '@jupyterlab/codeeditor';
|
|
|
|
|
|
-import { IConsoleTracker, ConsolePanel } from '@jupyterlab/console';
|
|
|
|
|
|
+import { ConsolePanel, IConsoleTracker } from '@jupyterlab/console';
|
|
|
|
|
|
import { IStateDB } from '@jupyterlab/coreutils';
|
|
import { IStateDB } from '@jupyterlab/coreutils';
|
|
|
|
|
|
-import { IEditorTracker, FileEditor } from '@jupyterlab/fileeditor';
|
|
|
|
|
|
+import { FileEditor, IEditorTracker } from '@jupyterlab/fileeditor';
|
|
|
|
|
|
import { INotebookTracker, NotebookPanel } from '@jupyterlab/notebook';
|
|
import { INotebookTracker, NotebookPanel } from '@jupyterlab/notebook';
|
|
|
|
|
|
@@ -242,10 +242,6 @@ const main: JupyterFrontEndPlugin<IDebugger> = {
|
|
|
|
|
|
let widget: MainAreaWidget<Debugger>;
|
|
let widget: MainAreaWidget<Debugger>;
|
|
|
|
|
|
- const getModel = () => {
|
|
|
|
- return tracker.currentWidget ? tracker.currentWidget.content.model : null;
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
commands.addCommand(CommandIDs.mount, {
|
|
commands.addCommand(CommandIDs.mount, {
|
|
execute: args => {
|
|
execute: args => {
|
|
if (!widget) {
|
|
if (!widget) {
|
|
@@ -337,18 +333,6 @@ const main: JupyterFrontEndPlugin<IDebugger> = {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
- commands.addCommand(CommandIDs.debugNotebook, {
|
|
|
|
- label: 'Launch',
|
|
|
|
- isEnabled: () => {
|
|
|
|
- return service.isStarted();
|
|
|
|
- },
|
|
|
|
- execute: async () => {
|
|
|
|
- await tracker.currentWidget.content.service.launch(
|
|
|
|
- getModel().codeValue.text
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
commands.addCommand(CommandIDs.changeMode, {
|
|
commands.addCommand(CommandIDs.changeMode, {
|
|
label: 'Change Mode',
|
|
label: 'Change Mode',
|
|
isEnabled: () => {
|
|
isEnabled: () => {
|