Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
37cb23d3
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,发现更多精彩内容 >>
提交
37cb23d3
编写于
3月 18, 2019
作者:
R
Rachel Macfarlane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Unregister comment controller when it is disposed
上级
4eb16c20
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
0 deletion
+16
-0
src/vs/workbench/api/electron-browser/mainThreadComments.ts
src/vs/workbench/api/electron-browser/mainThreadComments.ts
+7
-0
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+1
-0
src/vs/workbench/api/node/extHostComments.ts
src/vs/workbench/api/node/extHostComments.ts
+2
-0
src/vs/workbench/contrib/comments/electron-browser/commentService.ts
...bench/contrib/comments/electron-browser/commentService.ts
+6
-0
未找到文件。
src/vs/workbench/api/electron-browser/mainThreadComments.ts
浏览文件 @
37cb23d3
...
@@ -451,6 +451,13 @@ export class MainThreadComments extends Disposable implements MainThreadComments
...
@@ -451,6 +451,13 @@ export class MainThreadComments extends Disposable implements MainThreadComments
this
.
_commentService
.
setWorkspaceComments
(
String
(
handle
),
[]);
this
.
_commentService
.
setWorkspaceComments
(
String
(
handle
),
[]);
}
}
$unregisterCommentController
(
handle
:
number
):
void
{
const
providerId
=
this
.
_handlers
.
get
(
handle
);
this
.
_commentService
.
unregisterCommentController
(
providerId
);
this
.
_handlers
.
delete
(
handle
);
this
.
_commentControllers
.
delete
(
handle
);
}
$updateCommentControllerFeatures
(
handle
:
number
,
features
:
CommentProviderFeatures
):
void
{
$updateCommentControllerFeatures
(
handle
:
number
,
features
:
CommentProviderFeatures
):
void
{
let
provider
=
this
.
_commentControllers
.
get
(
handle
);
let
provider
=
this
.
_commentControllers
.
get
(
handle
);
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
37cb23d3
...
@@ -121,6 +121,7 @@ export interface CommentProviderFeatures {
...
@@ -121,6 +121,7 @@ export interface CommentProviderFeatures {
export
interface
MainThreadCommentsShape
extends
IDisposable
{
export
interface
MainThreadCommentsShape
extends
IDisposable
{
$registerCommentController
(
handle
:
number
,
id
:
string
,
label
:
string
):
void
;
$registerCommentController
(
handle
:
number
,
id
:
string
,
label
:
string
):
void
;
$unregisterCommentController
(
handle
:
number
):
void
;
$updateCommentControllerFeatures
(
handle
:
number
,
features
:
CommentProviderFeatures
):
void
;
$updateCommentControllerFeatures
(
handle
:
number
,
features
:
CommentProviderFeatures
):
void
;
$createCommentThread
(
handle
:
number
,
commentThreadHandle
:
number
,
threadId
:
string
,
resource
:
UriComponents
,
range
:
IRange
,
comments
:
modes
.
Comment
[],
acceptInputCommand
:
modes
.
Command
|
undefined
,
additionalCommands
:
modes
.
Command
[],
collapseState
:
modes
.
CommentThreadCollapsibleState
):
modes
.
CommentThread2
|
undefined
;
$createCommentThread
(
handle
:
number
,
commentThreadHandle
:
number
,
threadId
:
string
,
resource
:
UriComponents
,
range
:
IRange
,
comments
:
modes
.
Comment
[],
acceptInputCommand
:
modes
.
Command
|
undefined
,
additionalCommands
:
modes
.
Command
[],
collapseState
:
modes
.
CommentThreadCollapsibleState
):
modes
.
CommentThread2
|
undefined
;
$deleteCommentThread
(
handle
:
number
,
commentThreadHandle
:
number
):
void
;
$deleteCommentThread
(
handle
:
number
,
commentThreadHandle
:
number
):
void
;
...
...
src/vs/workbench/api/node/extHostComments.ts
浏览文件 @
37cb23d3
...
@@ -564,6 +564,8 @@ class ExtHostCommentController implements vscode.CommentController {
...
@@ -564,6 +564,8 @@ class ExtHostCommentController implements vscode.CommentController {
this
.
_threads
.
forEach
(
value
=>
{
this
.
_threads
.
forEach
(
value
=>
{
value
.
dispose
();
value
.
dispose
();
});
});
this
.
_proxy
.
$unregisterCommentController
(
this
.
handle
);
}
}
}
}
...
...
src/vs/workbench/contrib/comments/electron-browser/commentService.ts
浏览文件 @
37cb23d3
...
@@ -45,6 +45,7 @@ export interface ICommentService {
...
@@ -45,6 +45,7 @@ export interface ICommentService {
setWorkspaceComments
(
owner
:
string
,
commentsByResource
:
CommentThread
[]):
void
;
setWorkspaceComments
(
owner
:
string
,
commentsByResource
:
CommentThread
[]):
void
;
removeWorkspaceComments
(
owner
:
string
):
void
;
removeWorkspaceComments
(
owner
:
string
):
void
;
registerCommentController
(
owner
:
string
,
commentControl
:
MainThreadCommentController
):
void
;
registerCommentController
(
owner
:
string
,
commentControl
:
MainThreadCommentController
):
void
;
unregisterCommentController
(
owner
:
string
):
void
;
registerDataProvider
(
owner
:
string
,
commentProvider
:
DocumentCommentProvider
):
void
;
registerDataProvider
(
owner
:
string
,
commentProvider
:
DocumentCommentProvider
):
void
;
unregisterDataProvider
(
owner
:
string
):
void
;
unregisterDataProvider
(
owner
:
string
):
void
;
updateComments
(
ownerId
:
string
,
event
:
CommentThreadChangedEvent
):
void
;
updateComments
(
ownerId
:
string
,
event
:
CommentThreadChangedEvent
):
void
;
...
@@ -133,6 +134,11 @@ export class CommentService extends Disposable implements ICommentService {
...
@@ -133,6 +134,11 @@ export class CommentService extends Disposable implements ICommentService {
this
.
_onDidSetDataProvider
.
fire
();
this
.
_onDidSetDataProvider
.
fire
();
}
}
unregisterCommentController
(
owner
:
string
):
void
{
this
.
_commentControls
.
delete
(
owner
);
this
.
_onDidDeleteDataProvider
.
fire
(
owner
);
}
registerDataProvider
(
owner
:
string
,
commentProvider
:
DocumentCommentProvider
):
void
{
registerDataProvider
(
owner
:
string
,
commentProvider
:
DocumentCommentProvider
):
void
{
this
.
_commentProviders
.
set
(
owner
,
commentProvider
);
this
.
_commentProviders
.
set
(
owner
,
commentProvider
);
this
.
_onDidSetDataProvider
.
fire
();
this
.
_onDidSetDataProvider
.
fire
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录