Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
a0d07dcf
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,发现更多精彩内容 >>
提交
a0d07dcf
编写于
3月 20, 2020
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove activeCell concept
上级
815c03e3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
0 addition
and
44 deletion
+0
-44
src/vs/workbench/api/browser/mainThreadNotebook.ts
src/vs/workbench/api/browser/mainThreadNotebook.ts
+0
-13
src/vs/workbench/contrib/notebook/browser/notebookEditor.ts
src/vs/workbench/contrib/notebook/browser/notebookEditor.ts
+0
-6
src/vs/workbench/contrib/notebook/browser/notebookService.ts
src/vs/workbench/contrib/notebook/browser/notebookService.ts
+0
-20
src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts
...kbench/contrib/notebook/common/model/notebookTextModel.ts
+0
-5
未找到文件。
src/vs/workbench/api/browser/mainThreadNotebook.ts
浏览文件 @
a0d07dcf
...
...
@@ -238,11 +238,6 @@ export class MainThreadNotebookController implements IMainNotebookController {
document
?.
textModel
.
updateRenderers
(
renderers
);
}
updateNotebookActiveCell
(
uri
:
URI
,
cellHandle
:
number
):
void
{
let
mainthreadNotebook
=
this
.
_mapping
.
get
(
URI
.
from
(
uri
).
toString
());
mainthreadNotebook
?.
textModel
.
updateActiveCell
(
cellHandle
);
}
async
createRawCell
(
uri
:
URI
,
index
:
number
,
language
:
string
,
type
:
CellKind
):
Promise
<
NotebookCellTextModel
|
undefined
>
{
let
cell
=
await
this
.
_proxy
.
$createEmptyCell
(
this
.
_viewType
,
uri
,
index
,
language
,
type
);
if
(
cell
)
{
...
...
@@ -263,14 +258,6 @@ export class MainThreadNotebookController implements IMainNotebookController {
return
false
;
}
async
executeNotebookActiveCell
(
uri
:
URI
):
Promise
<
void
>
{
let
mainthreadNotebook
=
this
.
_mapping
.
get
(
URI
.
from
(
uri
).
toString
());
if
(
mainthreadNotebook
&&
mainthreadNotebook
.
textModel
.
activeCell
)
{
return
this
.
_proxy
.
$executeNotebook
(
this
.
_viewType
,
uri
,
mainthreadNotebook
.
textModel
.
activeCell
.
handle
);
}
}
async
executeNotebookCell
(
uri
:
URI
,
handle
:
number
):
Promise
<
void
>
{
return
this
.
_proxy
.
$executeNotebook
(
this
.
_viewType
,
uri
,
handle
);
}
...
...
src/vs/workbench/contrib/notebook/browser/notebookEditor.ts
浏览文件 @
a0d07dcf
...
...
@@ -382,12 +382,6 @@ export class NotebookEditor extends BaseEditor implements INotebookEditor {
}
}));
this
.
localStore
.
add
(
this
.
list
!
.
onDidChangeFocus
((
e
)
=>
{
if
(
e
.
elements
.
length
>
0
)
{
this
.
notebookService
.
updateNotebookActiveCell
(
input
.
viewType
!
,
input
.
resource
!
,
e
.
elements
[
0
].
handle
);
}
}));
this
.
list
?.
splice
(
0
,
this
.
list
?.
length
||
0
);
this
.
list
?.
splice
(
0
,
0
,
this
.
notebookViewModel
!
.
viewCells
as
CellViewModel
[]);
this
.
list
?.
layout
();
...
...
src/vs/workbench/contrib/notebook/browser/notebookService.ts
浏览文件 @
a0d07dcf
...
...
@@ -26,10 +26,8 @@ export const INotebookService = createDecorator<INotebookService>('notebookServi
export
interface
IMainNotebookController
{
resolveNotebook
(
viewType
:
string
,
uri
:
URI
):
Promise
<
NotebookTextModel
|
undefined
>
;
executeNotebook
(
viewType
:
string
,
uri
:
URI
):
Promise
<
void
>
;
updateNotebookActiveCell
(
uri
:
URI
,
cellHandle
:
number
):
void
;
createRawCell
(
uri
:
URI
,
index
:
number
,
language
:
string
,
type
:
CellKind
):
Promise
<
NotebookCellTextModel
|
undefined
>
;
deleteCell
(
uri
:
URI
,
index
:
number
):
Promise
<
boolean
>
executeNotebookActiveCell
(
uri
:
URI
):
Promise
<
void
>
;
onDidReceiveMessage
(
uri
:
URI
,
message
:
any
):
void
;
executeNotebookCell
(
uri
:
URI
,
handle
:
number
):
Promise
<
void
>
;
destoryNotebookDocument
(
notebook
:
INotebookTextModel
):
Promise
<
void
>
;
...
...
@@ -47,12 +45,10 @@ export interface INotebookService {
getRendererInfo
(
handle
:
number
):
INotebookRendererInfo
|
undefined
;
resolveNotebook
(
viewType
:
string
,
uri
:
URI
):
Promise
<
NotebookTextModel
|
undefined
>
;
executeNotebook
(
viewType
:
string
,
uri
:
URI
):
Promise
<
void
>
;
executeNotebookActiveCell
(
viewType
:
string
,
uri
:
URI
):
Promise
<
void
>
;
executeNotebookCell
(
viewType
:
string
,
uri
:
URI
,
handle
:
number
):
Promise
<
void
>
;
getContributedNotebookProviders
(
resource
:
URI
):
readonly
NotebookProviderInfo
[];
getNotebookProviderResourceRoots
():
URI
[];
updateNotebookActiveCell
(
viewType
:
string
,
resource
:
URI
,
cellHandle
:
number
):
void
;
createNotebookCell
(
viewType
:
string
,
resource
:
URI
,
index
:
number
,
language
:
string
,
type
:
CellKind
):
Promise
<
ICell
|
undefined
>
;
deleteNotebookCell
(
viewType
:
string
,
resource
:
URI
,
index
:
number
):
Promise
<
boolean
>
;
destoryNotebookDocument
(
viewType
:
string
,
notebook
:
INotebookTextModel
):
void
;
...
...
@@ -245,14 +241,6 @@ export class NotebookService extends Disposable implements INotebookService {
return
modelData
.
model
;
}
updateNotebookActiveCell
(
viewType
:
string
,
resource
:
URI
,
cellHandle
:
number
):
void
{
let
provider
=
this
.
_notebookProviders
.
get
(
viewType
);
if
(
provider
)
{
provider
.
controller
.
updateNotebookActiveCell
(
resource
,
cellHandle
);
}
}
async
createNotebookCell
(
viewType
:
string
,
resource
:
URI
,
index
:
number
,
language
:
string
,
type
:
CellKind
):
Promise
<
NotebookCellTextModel
|
undefined
>
{
let
provider
=
this
.
_notebookProviders
.
get
(
viewType
);
...
...
@@ -283,14 +271,6 @@ export class NotebookService extends Disposable implements INotebookService {
return
;
}
async
executeNotebookActiveCell
(
viewType
:
string
,
uri
:
URI
):
Promise
<
void
>
{
let
provider
=
this
.
_notebookProviders
.
get
(
viewType
);
if
(
provider
)
{
await
provider
.
controller
.
executeNotebookActiveCell
(
uri
);
}
}
async
executeNotebookCell
(
viewType
:
string
,
uri
:
URI
,
handle
:
number
):
Promise
<
void
>
{
const
provider
=
this
.
_notebookProviders
.
get
(
viewType
);
if
(
provider
)
{
...
...
src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts
浏览文件 @
a0d07dcf
...
...
@@ -19,7 +19,6 @@ export class NotebookTextModel extends Disposable implements INotebookTextModel
private
_mapping
:
Map
<
number
,
NotebookCellTextModel
>
=
new
Map
();
private
_cellListeners
:
Map
<
number
,
IDisposable
>
=
new
Map
();
cells
:
NotebookCellTextModel
[];
activeCell
:
NotebookCellTextModel
|
undefined
;
languages
:
string
[]
=
[];
metadata
:
NotebookDocumentMetadata
|
undefined
=
undefined
;
renderers
=
new
Set
<
number
>
();
...
...
@@ -47,10 +46,6 @@ export class NotebookTextModel extends Disposable implements INotebookTextModel
});
}
updateActiveCell
(
handle
:
number
)
{
this
.
activeCell
=
this
.
_mapping
.
get
(
handle
);
}
insertNewCell
(
index
:
number
,
cell
:
NotebookCellTextModel
):
void
{
this
.
_mapping
.
set
(
cell
.
handle
,
cell
);
this
.
cells
.
splice
(
index
,
0
,
cell
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录