Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fb41004c
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
fb41004c
编写于
4月 24, 2020
作者:
P
Peng Lyu
提交者:
GitHub
4月 24, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #96072 from microsoft/rebornix/notebook-actions-rename
Consistent notebook action names
上级
1b2f8b3a
c7e6927c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
54 addition
and
40 deletion
+54
-40
src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts
...workbench/contrib/notebook/browser/contrib/coreActions.ts
+50
-36
src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts
...h/contrib/notebook/browser/contrib/find/findController.ts
+2
-2
src/vs/workbench/contrib/notebook/browser/contrib/fold/folding.ts
...orkbench/contrib/notebook/browser/contrib/fold/folding.ts
+2
-2
未找到文件。
src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts
浏览文件 @
fb41004c
...
...
@@ -18,31 +18,45 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import
{
IClipboardService
}
from
'
vs/platform/clipboard/common/clipboardService
'
;
import
{
INotebookService
}
from
'
vs/workbench/contrib/notebook/browser/notebookService
'
;
const
INSERT_CODE_CELL_ABOVE_COMMAND_ID
=
'
workbench.notebook.code.insertCellAbove
'
;
const
INSERT_CODE_CELL_BELOW_COMMAND_ID
=
'
workbench.notebook.code.insertCellBelow
'
;
const
INSERT_MARKDOWN_CELL_ABOVE_COMMAND_ID
=
'
workbench.notebook.markdown.insertCellAbove
'
;
const
INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID
=
'
workbench.notebook.markdown.insertCellBelow
'
;
const
EDIT_CELL_COMMAND_ID
=
'
workbench.notebook.cell.edit
'
;
const
SAVE_CELL_COMMAND_ID
=
'
workbench.notebook.cell.save
'
;
const
DELETE_CELL_COMMAND_ID
=
'
workbench.notebook.cell.delete
'
;
const
MOVE_CELL_UP_COMMAND_ID
=
'
workbench.notebook.cell.moveUp
'
;
const
MOVE_CELL_DOWN_COMMAND_ID
=
'
workbench.notebook.cell.moveDown
'
;
const
COPY_CELL_COMMAND_ID
=
'
workbench.notebook.cell.copy
'
;
const
CUT_CELL_COMMAND_ID
=
'
workbench.notebook.cell.cut
'
;
const
PASTE_CELL_COMMAND_ID
=
'
workbench.notebook.cell.paste
'
;
const
PASTE_CELL_ABOVE_COMMAND_ID
=
'
workbench.notebook.cell.pasteAbove
'
;
const
COPY_CELL_UP_COMMAND_ID
=
'
workbench.notebook.cell.copyUp
'
;
const
COPY_CELL_DOWN_COMMAND_ID
=
'
workbench.notebook.cell.copyDown
'
;
const
EXECUTE_CELL_COMMAND_ID
=
'
workbench.notebook.cell.execute
'
;
const
CANCEL_CELL_COMMAND_ID
=
'
workbench.notebook.cell.cancelExecution
'
;
const
EXECUTE_NOTEBOOK_COMMAND_ID
=
'
workbench.notebook.executeNotebook
'
;
const
CANCEL_NOTEBOOK_COMMAND_ID
=
'
workbench.notebook.cancelExecution
'
;
const
CLEAR_CELL_OUTPUTS_COMMAND_ID
=
'
workbench.action.notebook.clearCellOutputs
'
;
const
CLEAR_ALL_CELLS_OUTPUTS_COMMAND_ID
=
'
workbench.action.notebook.clearAllCellsOutputs
'
;
// Notebook Commands
const
EXECUTE_NOTEBOOK_COMMAND_ID
=
'
notebook.execute
'
;
const
CANCEL_NOTEBOOK_COMMAND_ID
=
'
notebook.cancelExecution
'
;
const
NOTEBOOK_FOCUS_TOP
=
'
notebook.focusTop
'
;
const
NOTEBOOK_FOCUS_BOTTOM
=
'
notebook.focusBottom
'
;
const
NOTEBOOK_REDO
=
'
notebook.redo
'
;
const
NOTEBOOK_UNDO
=
'
notebook.undo
'
;
const
NOTEBOOK_CURSOR_UP
=
'
notebook.cursorUp
'
;
const
NOTEBOOK_CURSOR_DOWN
=
'
notebook.cursorDown
'
;
const
CLEAR_ALL_CELLS_OUTPUTS_COMMAND_ID
=
'
notebook.clearAllCellsOutputs
'
;
// Cell Commands
const
INSERT_CODE_CELL_ABOVE_COMMAND_ID
=
'
notebook.cell.insertCodeCellAbove
'
;
const
INSERT_CODE_CELL_BELOW_COMMAND_ID
=
'
notebook.cell.insertCodeCellBelow
'
;
const
INSERT_MARKDOWN_CELL_ABOVE_COMMAND_ID
=
'
notebook.cell.insertMarkdownCellAbove
'
;
const
INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID
=
'
notebook.cell.insertMarkdownCellBelow
'
;
const
CHANGE_CELL_TO_CODE_COMMAND_ID
=
'
notebook.cell.changeToCode
'
;
const
CHANGE_CELL_TO_MARKDOWN_COMMAND_ID
=
'
notebook.cell.changeToMarkdown
'
;
const
EDIT_CELL_COMMAND_ID
=
'
notebook.cell.edit
'
;
const
QUIT_EDIT_CELL_COMMAND_ID
=
'
notebook.cell.quitEdit
'
;
const
SAVE_CELL_COMMAND_ID
=
'
notebook.cell.save
'
;
const
DELETE_CELL_COMMAND_ID
=
'
notebook.cell.delete
'
;
const
MOVE_CELL_UP_COMMAND_ID
=
'
notebook.cell.moveUp
'
;
const
MOVE_CELL_DOWN_COMMAND_ID
=
'
notebook.cell.moveDown
'
;
const
COPY_CELL_COMMAND_ID
=
'
notebook.cell.copy
'
;
const
CUT_CELL_COMMAND_ID
=
'
notebook.cell.cut
'
;
const
PASTE_CELL_COMMAND_ID
=
'
notebook.cell.paste
'
;
const
PASTE_CELL_ABOVE_COMMAND_ID
=
'
notebook.cell.pasteAbove
'
;
const
COPY_CELL_UP_COMMAND_ID
=
'
notebook.cell.copyUp
'
;
const
COPY_CELL_DOWN_COMMAND_ID
=
'
notebook.cell.copyDown
'
;
const
EXECUTE_CELL_COMMAND_ID
=
'
notebook.cell.execute
'
;
const
CANCEL_CELL_COMMAND_ID
=
'
notebook.cell.cancelExecution
'
;
const
EXECUTE_CELL_SELECT_BELOW
=
'
notebook.cell.executeAndSelectBelow
'
;
const
EXECUTE_CELL_INSERT_BELOW
=
'
notebook.cell.executeAndInsertBelow
'
;
const
CLEAR_CELL_OUTPUTS_COMMAND_ID
=
'
notebook.cell.clearOutputs
'
;
const
NOTEBOOK_ACTIONS_CATEGORY
=
localize
(
'
notebookActions.category
'
,
"
Notebook
"
);
...
...
@@ -152,7 +166,7 @@ export class CancelCellAction extends MenuItemAction {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.executeNotebookCellSelectBelow
'
,
id
:
EXECUTE_CELL_SELECT_BELOW
,
title
:
localize
(
'
notebookActions.executeAndSelectBelow
'
,
"
Execute Notebook Cell and Select Below
"
),
keybinding
:
{
when
:
NOTEBOOK_EDITOR_FOCUSED
,
...
...
@@ -195,7 +209,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.executeNotebookCellInsertBelow
'
,
id
:
EXECUTE_CELL_INSERT_BELOW
,
title
:
localize
(
'
notebookActions.executeAndInsertBelow
'
,
"
Execute Notebook Cell and Insert Below
"
),
keybinding
:
{
when
:
NOTEBOOK_EDITOR_FOCUSED
,
...
...
@@ -269,7 +283,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.quitNotebookEdit
'
,
id
:
QUIT_EDIT_CELL_COMMAND_ID
,
title
:
localize
(
'
notebookActions.quitEditing
'
,
"
Quit Notebook Cell Editing
"
),
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
InputFocusedContext
),
...
...
@@ -335,7 +349,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.changeCellToCode
'
,
id
:
CHANGE_CELL_TO_CODE_COMMAND_ID
,
title
:
localize
(
'
notebookActions.changeCellToCode
'
,
"
Change Cell to Code
"
),
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
ContextKeyExpr
.
not
(
InputFocusedContextKey
)),
...
...
@@ -355,7 +369,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.changeCellToMarkdown
'
,
id
:
CHANGE_CELL_TO_MARKDOWN_COMMAND_ID
,
title
:
localize
(
'
notebookActions.changeCellToMarkdown
'
,
"
Change Cell to Markdown
"
),
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
ContextKeyExpr
.
not
(
InputFocusedContextKey
)),
...
...
@@ -968,7 +982,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.notebook.cursorDown
'
,
id
:
NOTEBOOK_CURSOR_DOWN
,
title
:
'
Notebook Cursor Move Down
'
,
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
ContextKeyExpr
.
has
(
InputFocusedContextKey
),
EditorContextKeys
.
editorTextFocus
,
NOTEBOOK_EDITOR_CURSOR_BOUNDARY
.
notEqualsTo
(
'
top
'
),
NOTEBOOK_EDITOR_CURSOR_BOUNDARY
.
notEqualsTo
(
'
none
'
)),
...
...
@@ -1007,7 +1021,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.notebook.cursorUp
'
,
id
:
NOTEBOOK_CURSOR_UP
,
title
:
'
Notebook Cursor Move Up
'
,
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
ContextKeyExpr
.
has
(
InputFocusedContextKey
),
EditorContextKeys
.
editorTextFocus
,
NOTEBOOK_EDITOR_CURSOR_BOUNDARY
.
notEqualsTo
(
'
bottom
'
),
NOTEBOOK_EDITOR_CURSOR_BOUNDARY
.
notEqualsTo
(
'
none
'
)),
...
...
@@ -1051,7 +1065,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.notebook.undo
'
,
id
:
NOTEBOOK_UNDO
,
title
:
'
Notebook Undo
'
,
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
ContextKeyExpr
.
not
(
InputFocusedContextKey
)),
...
...
@@ -1082,7 +1096,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.notebook.redo
'
,
id
:
NOTEBOOK_REDO
,
title
:
'
Notebook Redo
'
,
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
ContextKeyExpr
.
not
(
InputFocusedContextKey
)),
...
...
@@ -1113,7 +1127,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.notebook.focusTop
'
,
id
:
NOTEBOOK_FOCUS_TOP
,
title
:
'
Notebook Focus First Cell
'
,
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
ContextKeyExpr
.
not
(
InputFocusedContextKey
)),
...
...
@@ -1146,7 +1160,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.notebook.focusBottom
'
,
id
:
NOTEBOOK_FOCUS_BOTTOM
,
title
:
'
Notebook Focus Last Cell
'
,
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
ContextKeyExpr
.
not
(
InputFocusedContextKey
)),
...
...
src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts
浏览文件 @
fb41004c
...
...
@@ -254,7 +254,7 @@ registerNotebookContribution(NotebookFindWidget.id, NotebookFindWidget);
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.
notebook.hideFind
'
,
id
:
'
notebook.hideFind
'
,
title
:
localize
(
'
notebookActions.hideFind
'
,
"
Hide Find in Notebook
"
),
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED
),
...
...
@@ -281,7 +281,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.
notebook.find
'
,
id
:
'
notebook.find
'
,
title
:
localize
(
'
notebookActions.findInNotebook
'
,
"
Find in Notebook
"
),
keybinding
:
{
when
:
NOTEBOOK_EDITOR_FOCUSED
,
...
...
src/vs/workbench/contrib/notebook/browser/contrib/fold/folding.ts
浏览文件 @
fb41004c
...
...
@@ -132,7 +132,7 @@ registerNotebookContribution(FoldingController.id, FoldingController);
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.
notebook.fold
'
,
id
:
'
notebook.fold
'
,
title
:
'
Notebook Fold Cell
'
,
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
ContextKeyExpr
.
not
(
InputFocusedContextKey
)),
...
...
@@ -169,7 +169,7 @@ registerAction2(class extends Action2 {
registerAction2
(
class
extends
Action2
{
constructor
()
{
super
({
id
:
'
workbench.action.
notebook.unfold
'
,
id
:
'
notebook.unfold
'
,
title
:
'
Notebook Unfold Cell
'
,
keybinding
:
{
when
:
ContextKeyExpr
.
and
(
NOTEBOOK_EDITOR_FOCUSED
,
ContextKeyExpr
.
not
(
InputFocusedContextKey
)),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录