Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
300effb0
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
300effb0
编写于
2月 01, 2021
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add some notebook API todos
上级
01e92bdc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
1 deletion
+17
-1
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+17
-1
未找到文件。
src/vs/vscode.proposed.d.ts
浏览文件 @
300effb0
...
...
@@ -1319,9 +1319,9 @@ declare module 'vscode' {
/**
* The primary selected cell on this notebook editor.
*/
// todo@API should not be undefined, rather a default
readonly
selection
?:
NotebookCell
;
/**
* The current visible ranges in the editor (vertically).
*/
...
...
@@ -1330,21 +1330,25 @@ declare module 'vscode' {
/**
* The column in which this editor shows.
*/
// todo@API maybe never undefined because notebooks always show in the editor area (unlike text editors)
readonly
viewColumn
?:
ViewColumn
;
/**
* Fired when the panel is disposed.
*/
// todo@API fishy? notebooks are public objects, there should be a "global" events for this
readonly
onDidDispose
:
Event
<
void
>
;
/**
* Active kernel used in the editor
*/
// todo@API unsure about that
readonly
kernel
?:
NotebookKernel
;
/**
* Fired when the output hosting webview posts a message.
*/
// todo@API notebook editors are public -> ANY extension can listen to these event
readonly
onDidReceiveMessage
:
Event
<
any
>
;
/**
* Post a message to the output hosting webview.
...
...
@@ -1353,11 +1357,13 @@ declare module 'vscode' {
*
* @param message Body of the message. This must be a string or other json serializable object.
*/
// todo@API notebook editors are public -> ANY extension can send messages
postMessage
(
message
:
any
):
Thenable
<
boolean
>
;
/**
* Convert a uri for the local file system to one that can be used inside outputs webview.
*/
// todo@API unsure about that, how do you this when executing a cell without having an editor
asWebviewUri
(
localResource
:
Uri
):
Uri
;
/**
...
...
@@ -1455,6 +1461,7 @@ declare module 'vscode' {
readonly
cellKind
:
CellKind
;
readonly
source
:
string
;
readonly
language
:
string
;
// todo@API maybe use a separate data type?
readonly
outputs
:
CellOutput
[];
readonly
metadata
:
NotebookCellMetadata
|
undefined
;
}
...
...
@@ -1592,6 +1599,8 @@ declare module 'vscode' {
detail
?:
string
;
isPreferred
?:
boolean
;
preloads
?:
Uri
[];
// todo@API change to `executeCells(document: NotebookDocument, cell: NotebookCell[]): void;`
// todo@API interrupt vs cancellation, https://github.com/microsoft/vscode/issues/106741
executeCell
(
document
:
NotebookDocument
,
cell
:
NotebookCell
):
void
;
cancelCellExecution
(
document
:
NotebookDocument
,
cell
:
NotebookCell
):
void
;
executeAllCells
(
document
:
NotebookDocument
):
void
;
...
...
@@ -1600,11 +1609,14 @@ declare module 'vscode' {
export
type
NotebookFilenamePattern
=
GlobPattern
|
{
include
:
GlobPattern
;
exclude
:
GlobPattern
;
};
// todo@API why not for NotebookContentProvider?
export
interface
NotebookDocumentFilter
{
viewType
?:
string
|
string
[];
filenamePattern
?:
NotebookFilenamePattern
;
}
// todo@API very unclear, provider MUST not return alive object but only data object
// todo@API unclear how the flow goes
export
interface
NotebookKernelProvider
<
T
extends
NotebookKernel
=
NotebookKernel
>
{
onDidChangeKernels
?:
Event
<
NotebookDocument
|
undefined
>
;
provideKernels
(
document
:
NotebookDocument
,
token
:
CancellationToken
):
ProviderResult
<
T
[]
>
;
...
...
@@ -1684,6 +1696,8 @@ declare module 'vscode' {
export
function
openNotebookDocument
(
uri
:
Uri
,
viewType
?:
string
):
Thenable
<
NotebookDocument
>
;
export
const
onDidOpenNotebookDocument
:
Event
<
NotebookDocument
>
;
export
const
onDidCloseNotebookDocument
:
Event
<
NotebookDocument
>
;
// todo@API really needed?
export
const
onDidSaveNotebookDocument
:
Event
<
NotebookDocument
>
;
/**
...
...
@@ -1702,6 +1716,7 @@ declare module 'vscode' {
* @param notebook
* @param selector
*/
// todo@API really needed? we didn't find a user here
export
function
createConcatTextDocument
(
notebook
:
NotebookDocument
,
selector
?:
DocumentSelector
):
NotebookConcatTextDocument
;
export
const
onDidChangeActiveNotebookKernel
:
Event
<
{
document
:
NotebookDocument
,
kernel
:
NotebookKernel
|
undefined
;
}
>
;
...
...
@@ -1715,6 +1730,7 @@ declare module 'vscode' {
* @param priority The priority of the item. Higher values mean the item should be shown more to the left.
* @return A new status bar item.
*/
// todo@API this should be a provider, https://github.com/microsoft/vscode/issues/105809
export
function
createCellStatusBarItem
(
cell
:
NotebookCell
,
alignment
?:
NotebookCellStatusBarAlignment
,
priority
?:
number
):
NotebookCellStatusBarItem
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录