Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
abbc2e30
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,发现更多精彩内容 >>
提交
abbc2e30
编写于
2月 01, 2021
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more API todos for notebooks
上级
750888c4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
32 addition
and
1 deletion
+32
-1
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+32
-1
未找到文件。
src/vs/vscode.proposed.d.ts
浏览文件 @
abbc2e30
...
...
@@ -1322,6 +1322,12 @@ declare module 'vscode' {
// todo@API should not be undefined, rather a default
readonly
selection
?:
NotebookCell
;
// @rebornix
// todo@API should replace selection
// never empty!
// primary/secondary selections
// readonly selections: NotebookCellRange[];
/**
* The current visible ranges in the editor (vertically).
*/
...
...
@@ -1330,12 +1336,15 @@ declare module 'vscode' {
/**
* The column in which this editor shows.
*/
// @jrieken
// todo@API maybe never undefined because notebooks always show in the editor area (unlike text editors)
// maybe for notebook diff editor
readonly
viewColumn
?:
ViewColumn
;
/**
* Fired when the panel is disposed.
*/
// @rebornix REMOVE/REplace NotebookCommunication
// todo@API fishy? notebooks are public objects, there should be a "global" events for this
readonly
onDidDispose
:
Event
<
void
>
;
...
...
@@ -1343,11 +1352,13 @@ declare module 'vscode' {
* Active kernel used in the editor
*/
// todo@API unsure about that
// kernel, kernel selection, kernel provider
readonly
kernel
?:
NotebookKernel
;
/**
* Fired when the output hosting webview posts a message.
*/
// @rebornix REMOVE
// todo@API notebook editors are public -> ANY extension can listen to these event
readonly
onDidReceiveMessage
:
Event
<
any
>
;
/**
...
...
@@ -1357,12 +1368,14 @@ declare module 'vscode' {
*
* @param message Body of the message. This must be a string or other json serializable object.
*/
// @rebornix REMOVE
// 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.
*/
// @rebornix REMOVE
// todo@API unsure about that, how do you this when executing a cell without having an editor
asWebviewUri
(
localResource
:
Uri
):
Uri
;
...
...
@@ -1376,6 +1389,7 @@ declare module 'vscode' {
* @param callback A function which can create edits using an [edit-builder](#NotebookEditorEdit).
* @return A promise that resolves with a value indicating if the edits could be applied.
*/
// @jrieken REMOVE maybe
edit
(
callback
:
(
editBuilder
:
NotebookEditorEdit
)
=>
void
):
Thenable
<
boolean
>
;
setDecorations
(
decorationType
:
NotebookEditorDecorationType
,
range
:
NotebookCellRange
):
void
;
...
...
@@ -1480,6 +1494,7 @@ declare module 'vscode' {
readonly
document
:
NotebookDocument
;
}
// @rebornix p2, remove
// todo@API is this still needed? With transient metadata have we everything covered?
interface
NotebookDocumentEditEvent
{
...
...
@@ -1569,11 +1584,17 @@ declare module 'vscode' {
* Convert a uri for the local file system to one that can be used inside outputs webview.
*/
asWebviewUri
(
localResource
:
Uri
):
Uri
;
// @rebornix
// readonly onDidDispose: Event<void>;
}
export
interface
NotebookContentProvider
{
readonly
options
?:
NotebookDocumentContentOptions
;
readonly
onDidChangeNotebookContentOptions
?:
Event
<
NotebookDocumentContentOptions
>
;
// @rebornix
// todo@API should be removed
readonly
onDidChangeNotebook
:
Event
<
NotebookDocumentContentChangeEvent
|
NotebookDocumentEditEvent
>
;
/**
...
...
@@ -1591,6 +1612,10 @@ declare module 'vscode' {
saveNotebookAs
(
targetResource
:
Uri
,
document
:
NotebookDocument
,
cancellation
:
CancellationToken
):
Thenable
<
void
>
;
// eslint-disable-next-line vscode-dts-provider-naming
backupNotebook
(
document
:
NotebookDocument
,
context
:
NotebookDocumentBackupContext
,
cancellation
:
CancellationToken
):
Thenable
<
NotebookDocumentBackup
>
;
// provideKernels(document: NotebookDocument, token: CancellationToken): ProviderResult<T[]>;
}
export
interface
NotebookKernel
{
...
...
@@ -1600,8 +1625,10 @@ declare module 'vscode' {
detail
?:
string
;
isPreferred
?:
boolean
;
preloads
?:
Uri
[];
// todo@API change to `executeCells(document: NotebookDocument, cell: NotebookCell[]): void;`
// @roblourens
// todo@API change to `executeCells(document: NotebookDocument, cells: NotebookCellRange[], context:{isWholeNotebooke: boolean}, token: CancelationToken): void;`
// todo@API interrupt vs cancellation, https://github.com/microsoft/vscode/issues/106741
// interrupt?():void;
executeCell
(
document
:
NotebookDocument
,
cell
:
NotebookCell
):
void
;
cancelCellExecution
(
document
:
NotebookDocument
,
cell
:
NotebookCell
):
void
;
executeAllCells
(
document
:
NotebookDocument
):
void
;
...
...
@@ -1624,6 +1651,8 @@ declare module 'vscode' {
resolveKernel
?(
kernel
:
T
,
document
:
NotebookDocument
,
webview
:
NotebookCommunication
,
token
:
CancellationToken
):
ProviderResult
<
void
>
;
}
// export function registerNotebookKernel(selector: string, kernel: NotebookKernel): Disposable;
/**
* Represents the alignment of status bar items.
*/
...
...
@@ -1719,6 +1748,7 @@ declare module 'vscode' {
* @param notebook
* @param selector
*/
// @jrieken REMOVE. p_never
// todo@API really needed? we didn't find a user here
export
function
createConcatTextDocument
(
notebook
:
NotebookDocument
,
selector
?:
DocumentSelector
):
NotebookConcatTextDocument
;
...
...
@@ -1733,6 +1763,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.
*/
// @roblourens
// 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录