Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
2d6d4a32
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,发现更多精彩内容 >>
未验证
提交
2d6d4a32
编写于
10月 06, 2020
作者:
P
Peng Lyu
提交者:
GitHub
10月 06, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #108144 from microsoft/rebornix/notebookEditorDebt
Move acitve/visible notebook editors to window namespace.
上级
ee49b286
9ba85c3d
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
272 addition
and
251 deletion
+272
-251
extensions/vscode-notebook-tests/src/notebook.test.ts
extensions/vscode-notebook-tests/src/notebook.test.ts
+228
-230
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+9
-18
src/vs/workbench/api/common/extHost.api.impl.ts
src/vs/workbench/api/common/extHost.api.impl.ts
+35
-3
未找到文件。
extensions/vscode-notebook-tests/src/notebook.test.ts
浏览文件 @
2d6d4a32
此差异已折叠。
点击以展开。
src/vs/vscode.proposed.d.ts
浏览文件 @
2d6d4a32
...
...
@@ -1485,16 +1485,6 @@ declare module 'vscode' {
*/
readonly
viewColumn
?:
ViewColumn
;
/**
* Whether the panel is active (focused by the user).
*/
readonly
active
:
boolean
;
/**
* Whether the panel is visible.
*/
readonly
visible
:
boolean
;
/**
* Fired when the panel is disposed.
*/
...
...
@@ -1839,14 +1829,6 @@ declare module 'vscode' {
* All currently known notebook documents.
*/
export
const
notebookDocuments
:
ReadonlyArray
<
NotebookDocument
>
;
export
const
visibleNotebookEditors
:
NotebookEditor
[];
export
const
onDidChangeVisibleNotebookEditors
:
Event
<
NotebookEditor
[]
>
;
export
const
activeNotebookEditor
:
NotebookEditor
|
undefined
;
export
const
onDidChangeActiveNotebookEditor
:
Event
<
NotebookEditor
|
undefined
>
;
export
const
onDidChangeNotebookEditorSelection
:
Event
<
NotebookEditorSelectionChangeEvent
>
;
export
const
onDidChangeNotebookEditorVisibleRanges
:
Event
<
NotebookEditorVisibleRangesChangeEvent
>
;
export
const
onDidChangeNotebookDocumentMetadata
:
Event
<
NotebookDocumentMetadataChangeEvent
>
;
export
const
onDidChangeNotebookCells
:
Event
<
NotebookCellsChangeEvent
>
;
export
const
onDidChangeCellOutputs
:
Event
<
NotebookCellOutputsChangeEvent
>
;
...
...
@@ -1875,6 +1857,15 @@ declare module 'vscode' {
export
function
createCellStatusBarItem
(
cell
:
NotebookCell
,
alignment
?:
NotebookCellStatusBarAlignment
,
priority
?:
number
):
NotebookCellStatusBarItem
;
}
export
namespace
window
{
export
const
visibleNotebookEditors
:
NotebookEditor
[];
export
const
onDidChangeVisibleNotebookEditors
:
Event
<
NotebookEditor
[]
>
;
export
const
activeNotebookEditor
:
NotebookEditor
|
undefined
;
export
const
onDidChangeActiveNotebookEditor
:
Event
<
NotebookEditor
|
undefined
>
;
export
const
onDidChangeNotebookEditorSelection
:
Event
<
NotebookEditorSelectionChangeEvent
>
;
export
const
onDidChangeNotebookEditorVisibleRanges
:
Event
<
NotebookEditorVisibleRangesChangeEvent
>
;
}
//#endregion
//#region https://github.com/microsoft/vscode/issues/39441
...
...
src/vs/workbench/api/common/extHost.api.impl.ts
浏览文件 @
2d6d4a32
...
...
@@ -630,7 +630,31 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
}
})
{
return
extHostWebviewViews
.
registerWebviewViewProvider
(
extension
,
viewId
,
provider
,
options
?.
webviewOptions
);
}
},
get
activeNotebookEditor
():
vscode
.
NotebookEditor
|
undefined
{
checkProposedApiEnabled
(
extension
);
return
extHostNotebook
.
activeNotebookEditor
;
},
onDidChangeActiveNotebookEditor
(
listener
,
thisArgs
?,
disposables
?)
{
checkProposedApiEnabled
(
extension
);
return
extHostNotebook
.
onDidChangeActiveNotebookEditor
(
listener
,
thisArgs
,
disposables
);
},
get
visibleNotebookEditors
()
{
checkProposedApiEnabled
(
extension
);
return
extHostNotebook
.
visibleNotebookEditors
;
},
get
onDidChangeVisibleNotebookEditors
()
{
checkProposedApiEnabled
(
extension
);
return
extHostNotebook
.
onDidChangeVisibleNotebookEditors
;
},
onDidChangeNotebookEditorSelection
(
listener
,
thisArgs
?,
disposables
?)
{
checkProposedApiEnabled
(
extension
);
return
extHostNotebook
.
onDidChangeNotebookEditorSelection
(
listener
,
thisArgs
,
disposables
);
},
onDidChangeNotebookEditorVisibleRanges
(
listener
,
thisArgs
?,
disposables
?)
{
checkProposedApiEnabled
(
extension
);
return
extHostNotebook
.
onDidChangeNotebookEditorVisibleRanges
(
listener
,
thisArgs
,
disposables
);
},
};
// namespace: workspace
...
...
@@ -925,7 +949,15 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
};
// namespace: notebook
const
notebook
:
typeof
vscode
.
notebook
=
{
const
notebook
:
(
typeof
vscode
.
notebook
&
{
// to ensure that notebook extensions not break before they update APIs.
visibleNotebookEditors
:
vscode
.
NotebookEditor
[];
onDidChangeVisibleNotebookEditors
:
Event
<
vscode
.
NotebookEditor
[]
>
;
activeNotebookEditor
:
vscode
.
NotebookEditor
|
undefined
;
onDidChangeActiveNotebookEditor
:
Event
<
vscode
.
NotebookEditor
|
undefined
>
;
onDidChangeNotebookEditorSelection
:
Event
<
vscode
.
NotebookEditorSelectionChangeEvent
>
;
onDidChangeNotebookEditorVisibleRanges
:
Event
<
vscode
.
NotebookEditorVisibleRangesChangeEvent
>
;
})
=
{
get
onDidOpenNotebookDocument
():
Event
<
vscode
.
NotebookDocument
>
{
checkProposedApiEnabled
(
extension
);
return
extHostNotebook
.
onDidOpenNotebookDocument
;
...
...
@@ -942,7 +974,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
checkProposedApiEnabled
(
extension
);
return
extHostNotebook
.
notebookDocuments
.
map
(
d
=>
d
.
notebookDocument
);
},
get
visibleNotebookEditors
()
{
get
visibleNotebookEditors
()
:
vscode
.
NotebookEditor
[]
{
checkProposedApiEnabled
(
extension
);
return
extHostNotebook
.
visibleNotebookEditors
;
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录