mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Merge pull request #178837 from amunger/aamunger/IWInterrupt
enable core interrupt command for IW
This commit is contained in:
commit
80b3a432e6
|
@ -10,7 +10,7 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
|||
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { getNotebookEditorFromEditorPane, IActiveNotebookEditor, ICellViewModel, cellRangeToViewCells } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
|
||||
import { NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_KERNEL_COUNT, NOTEBOOK_KERNEL_SOURCE_COUNT } from 'vs/workbench/contrib/notebook/common/notebookContextKeys';
|
||||
import { INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_KERNEL_COUNT, NOTEBOOK_KERNEL_SOURCE_COUNT } from 'vs/workbench/contrib/notebook/common/notebookContextKeys';
|
||||
import { ICellRange, isICellRange } from 'vs/workbench/contrib/notebook/common/notebookRange';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IEditorCommandsContext } from 'vs/workbench/common/editor';
|
||||
|
@ -116,7 +116,7 @@ export abstract class NotebookAction extends Action2 {
|
|||
desc.f1 = false;
|
||||
const f1Menu = {
|
||||
id: MenuId.CommandPalette,
|
||||
when: NOTEBOOK_IS_ACTIVE_EDITOR
|
||||
when: ContextKeyExpr.or(NOTEBOOK_IS_ACTIVE_EDITOR, INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR)
|
||||
};
|
||||
|
||||
if (!desc.menu) {
|
||||
|
|
|
@ -566,6 +566,15 @@ registerAction2(class InterruptNotebook extends CancelNotebook {
|
|||
NOTEBOOK_INTERRUPTIBLE_KERNEL,
|
||||
ContextKeyExpr.equals('config.notebook.globalToolbar', true)
|
||||
)
|
||||
},
|
||||
{
|
||||
id: MenuId.InteractiveToolbar,
|
||||
when: ContextKeyExpr.and(
|
||||
NOTEBOOK_HAS_RUNNING_CELL,
|
||||
NOTEBOOK_INTERRUPTIBLE_KERNEL,
|
||||
ContextKeyExpr.equals('resourceScheme', Schemas.vscodeInteractive)
|
||||
),
|
||||
group: 'navigation/execute'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue