Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
57ca27e5
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,发现更多精彩内容 >>
提交
57ca27e5
编写于
11月 19, 2020
作者:
R
rebornix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
merge cell action view
上级
8cf97fef
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
23 deletion
+25
-23
src/vs/workbench/contrib/notebook/browser/view/renderers/cellActionView.ts
...contrib/notebook/browser/view/renderers/cellActionView.ts
+23
-2
src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.ts
...h/contrib/notebook/browser/view/renderers/cellRenderer.ts
+2
-2
src/vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets.ts
...ch/contrib/notebook/browser/view/renderers/cellWidgets.ts
+0
-19
未找到文件。
src/vs/workbench/contrib/notebook/browser/view/renderers/cellActionView.ts
浏览文件 @
57ca27e5
...
...
@@ -3,10 +3,15 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
renderCodicons
}
from
'
vs/base/browser/codicons
'
;
import
*
as
DOM
from
'
vs/base/browser/dom
'
;
import
{
BaseActionViewItem
}
from
'
vs/base/browser/ui/actionbar/actionViewItems
'
;
import
{
Action
,
IAction
,
Separator
}
from
'
vs/base/common/actions
'
;
import
{
IMenu
,
IMenuActionOptions
,
MenuItemAction
,
SubmenuItemAction
}
from
'
vs/platform/actions/common/actions
'
;
import
{
DisposableStore
,
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
BaseActionViewItem
}
from
'
vs/base/browser/ui/actionbar/actionViewItems
'
;
import
{
MenuEntryActionViewItem
}
from
'
vs/platform/actions/browser/menuEntryActionViewItem
'
;
import
{
IMenu
,
IMenuActionOptions
,
MenuItemAction
,
SubmenuItemAction
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
export
class
VerticalSeparator
extends
Action
{
static
readonly
ID
=
'
vs.actions.verticalSeparator
'
;
...
...
@@ -74,3 +79,19 @@ function asDisposable(groups: ReadonlyArray<[string, ReadonlyArray<MenuItemActio
}
return
disposables
;
}
export
class
CodiconActionViewItem
extends
MenuEntryActionViewItem
{
constructor
(
readonly
_action
:
MenuItemAction
,
keybindingService
:
IKeybindingService
,
notificationService
:
INotificationService
,
)
{
super
(
_action
,
keybindingService
,
notificationService
);
}
updateLabel
():
void
{
if
(
this
.
options
.
label
&&
this
.
label
)
{
DOM
.
reset
(
this
.
label
,
...
renderCodicons
(
this
.
_commandAction
.
label
??
''
));
}
}
}
src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.ts
浏览文件 @
57ca27e5
...
...
@@ -40,7 +40,7 @@ import { CancelCellAction, DeleteCellAction, ExecuteCellAction, INotebookCellAct
import
{
BaseCellRenderTemplate
,
CellEditState
,
CodeCellRenderTemplate
,
EXPAND_CELL_CONTENT_COMMAND_ID
,
ICellViewModel
,
INotebookEditor
,
isCodeCellRenderTemplate
,
MarkdownCellRenderTemplate
}
from
'
vs/workbench/contrib/notebook/browser/notebookBrowser
'
;
import
{
CellContextKeyManager
}
from
'
vs/workbench/contrib/notebook/browser/view/renderers/cellContextKeys
'
;
import
{
CellMenus
}
from
'
vs/workbench/contrib/notebook/browser/view/renderers/cellMenus
'
;
import
{
CellEditorStatusBar
,
CodiconActionViewItem
}
from
'
vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets
'
;
import
{
CellEditorStatusBar
}
from
'
vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets
'
;
import
{
CodeCell
}
from
'
vs/workbench/contrib/notebook/browser/view/renderers/codeCell
'
;
import
{
CellDragAndDropController
,
DRAGGING_CLASS
}
from
'
vs/workbench/contrib/notebook/browser/view/renderers/dnd
'
;
import
{
StatefulMarkdownCell
}
from
'
vs/workbench/contrib/notebook/browser/view/renderers/markdownCell
'
;
...
...
@@ -48,7 +48,7 @@ import { CodeCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewMod
import
{
MarkdownCellViewModel
}
from
'
vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel
'
;
import
{
CellViewModel
}
from
'
vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel
'
;
import
{
CellEditType
,
CellKind
,
NotebookCellMetadata
,
NotebookCellRunState
,
ShowCellStatusBarKey
}
from
'
vs/workbench/contrib/notebook/common/notebookCommon
'
;
import
{
createAndFillInActionBarActionsWithVerticalSeparators
,
VerticalSeparator
,
VerticalSeparatorViewItem
}
from
'
./cellActionView
'
;
import
{
CodiconActionViewItem
,
createAndFillInActionBarActionsWithVerticalSeparators
,
VerticalSeparator
,
VerticalSeparatorViewItem
}
from
'
./cellActionView
'
;
const
$
=
DOM
.
$
;
...
...
src/vs/workbench/contrib/notebook/browser/view/renderers/cellWidgets.ts
浏览文件 @
57ca27e5
...
...
@@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
renderCodicons
}
from
'
vs/base/browser/codicons
'
;
import
*
as
DOM
from
'
vs/base/browser/dom
'
;
import
{
StandardKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
CodiconLabel
}
from
'
vs/base/browser/ui/codicons/codiconLabel
'
;
...
...
@@ -18,11 +17,8 @@ import { ElementSizeObserver } from 'vs/editor/browser/config/elementSizeObserve
import
{
IDimension
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
MenuEntryActionViewItem
}
from
'
vs/platform/actions/browser/menuEntryActionViewItem
'
;
import
{
MenuItemAction
}
from
'
vs/platform/actions/common/actions
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
ChangeCellLanguageAction
,
INotebookCellActionContext
}
from
'
vs/workbench/contrib/notebook/browser/contrib/coreActions
'
;
...
...
@@ -261,21 +257,6 @@ export class CellLanguageStatusBarItem extends Disposable {
}
}
export
class
CodiconActionViewItem
extends
MenuEntryActionViewItem
{
constructor
(
readonly
_action
:
MenuItemAction
,
keybindingService
:
IKeybindingService
,
notificationService
:
INotificationService
,
)
{
super
(
_action
,
keybindingService
,
notificationService
);
}
updateLabel
():
void
{
if
(
this
.
options
.
label
&&
this
.
label
)
{
DOM
.
reset
(
this
.
label
,
...
renderCodicons
(
this
.
_commandAction
.
label
??
''
));
}
}
}
declare
const
ResizeObserver
:
any
;
export
interface
IResizeObserver
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录