Skip to content

Commit 7357d24

Browse files
committed
added jshell context in the editor context
1 parent 578ddbd commit 7357d24

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

vscode/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,11 @@
636636
"command": "jdk.project.debug",
637637
"when": "nbJdkReady && editorLangId == java && resourceExtname == .java",
638638
"group": "javadebug@2"
639+
},
640+
{
641+
"command": "jdk.jshell.project",
642+
"when": "nbJdkReady && editorLangId == java && resourceExtname == .java",
643+
"group": "javadebug@3"
639644
}
640645
],
641646
"explorer/context": [
@@ -663,6 +668,11 @@
663668
"command": "jdk.project.debug",
664669
"when": "nbJdkReady && resourceExtname == .java",
665670
"group": "javadebug@2"
671+
},
672+
{
673+
"command": "jdk.jshell.project",
674+
"when": "nbJdkReady && resourceExtname == .java",
675+
"group": "javadebug@3"
666676
}
667677
],
668678
"commandPalette": [

vscode/src/commands/notebook.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { getContextUri, isNbCommandRegistered } from './utils';
1212
import { l10n } from '../localiser';
1313
import { extConstants } from '../constants';
1414
import { Notebook } from '../notebooks/notebook';
15-
import { ICell, ICodeCell } from '../notebooks/types';
15+
import { ICodeCell } from '../notebooks/types';
1616
import { randomUUID } from 'crypto';
1717

1818
const createNewNotebook = async (ctx?: any) => {
@@ -94,7 +94,7 @@ const createNewNotebook = async (ctx?: any) => {
9494
execution_count: null,
9595
outputs: [],
9696
id: randomUUID(),
97-
metadata: undefined,
97+
metadata: {},
9898
source: ''
9999
};
100100

0 commit comments

Comments
 (0)