Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
0683efcf
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,发现更多精彩内容 >>
提交
0683efcf
编写于
5月 06, 2019
作者:
P
Peng Lyu
提交者:
Rachel Macfarlane
5月 06, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Deprecate commands for static contribution later, fixes #73333
上级
66d5d871
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
50 addition
and
21 deletion
+50
-21
src/vs/vscode.d.ts
src/vs/vscode.d.ts
+16
-17
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+25
-0
src/vs/workbench/api/common/extHostComments.ts
src/vs/workbench/api/common/extHostComments.ts
+9
-4
未找到文件。
src/vs/vscode.d.ts
浏览文件 @
0683efcf
...
...
@@ -8970,7 +8970,7 @@ declare module 'vscode' {
/**
* The uri of the document the thread has been created on.
*/
readonly
resource
:
Uri
;
readonly
uri
:
Uri
;
/**
* The range the comment thread is located within the document. The thread icon will be shown
...
...
@@ -9003,25 +9003,29 @@ declare module 'vscode' {
*/
acceptInputCommand
?:
Command
;
/**
*
Optional additonal commands
.
*
Dispose this comment thread
.
*
*
`additionalCommands` are the secondary actions rendered on Comment Widget
.
*
Once disposed, this comment thread will be removed from visible editors and Comment Panel when approriate
.
*/
additionalCommands
?:
Command
[];
dispose
():
void
;
}
/**
* Author information of a [comment](#Comment)
*/
export
interface
CommentAuthorInformation
{
/**
* The command to be executed when users try to delete the comment thread. Currently, this is only called
* when the user collapses a comment thread that has no comments in it.
* The display name of the author of the comment
*/
deleteCommand
?:
Command
;
name
:
string
;
/**
* Dispose this comment thread.
*
* Once disposed, this comment thread will be removed from visible editors and Comment Panel when approriate.
* The optional icon path for the author
*/
dispose
():
void
;
iconPath
?:
Uri
;
}
/**
...
...
@@ -9074,11 +9078,6 @@ declare module 'vscode' {
* The command to be executed when users try to save the edits to the comment
*/
editCommand
?:
Command
;
/**
* The command to be executed when users try to delete the comment
*/
deleteCommand
?:
Command
;
}
/**
...
...
@@ -9193,7 +9192,7 @@ declare module 'vscode' {
* @param range The range the comment thread is located within the document.
* @param comments The ordered comments of the thread.
*/
createCommentThread
(
id
:
string
,
resource
:
Uri
,
range
:
Range
,
comments
:
Comment
[]):
CommentThread
;
createCommentThread
(
id
:
string
,
uri
:
Uri
,
range
:
Range
,
comments
:
Comment
[]):
CommentThread
;
/**
* Dispose this comment controller.
...
...
src/vs/vscode.proposed.d.ts
浏览文件 @
0683efcf
...
...
@@ -792,6 +792,11 @@ declare module 'vscode' {
*/
isDraft
?:
boolean
;
/**
* The command to be executed when users try to delete the comment
*/
deleteCommand
?:
Command
;
/**
* Proposed Comment Reaction
*/
...
...
@@ -905,6 +910,26 @@ declare module 'vscode' {
toggleReaction
?(
document
:
TextDocument
,
comment
:
Comment
,
reaction
:
CommentReaction
):
Promise
<
void
>
;
}
export
interface
CommentThread
{
/**
* The uri of the document the thread has been created on.
*/
readonly
resource
:
Uri
;
/**
* Optional additonal commands.
*
* `additionalCommands` are the secondary actions rendered on Comment Widget.
*/
additionalCommands
?:
Command
[];
/**
* The command to be executed when users try to delete the comment thread. Currently, this is only called
* when the user collapses a comment thread that has no comments in it.
*/
deleteCommand
?:
Command
;
}
export
interface
CommentController
{
/**
...
...
src/vs/workbench/api/common/extHostComments.ts
浏览文件 @
0683efcf
...
...
@@ -385,7 +385,11 @@ export class ExtHostCommentThread implements vscode.CommentThread {
}
get
resource
():
vscode
.
Uri
{
return
this
.
_resource
;
return
this
.
_uri
;
}
get
uri
():
vscode
.
Uri
{
return
this
.
_uri
;
}
private
_onDidUpdateCommentThread
=
new
Emitter
<
void
>
();
...
...
@@ -476,7 +480,7 @@ export class ExtHostCommentThread implements vscode.CommentThread {
private
readonly
_commandsConverter
:
CommandsConverter
,
private
_commentController
:
ExtHostCommentController
,
private
_id
:
string
,
private
_
resource
:
vscode
.
Uri
,
private
_
uri
:
vscode
.
Uri
,
private
_range
:
vscode
.
Range
,
private
_comments
:
vscode
.
Comment
[]
)
{
...
...
@@ -484,7 +488,7 @@ export class ExtHostCommentThread implements vscode.CommentThread {
this
.
_commentController
.
handle
,
this
.
handle
,
this
.
_id
,
this
.
_
resource
,
this
.
_
uri
,
extHostTypeConverter
.
Range
.
from
(
this
.
_range
)
);
...
...
@@ -513,7 +517,7 @@ export class ExtHostCommentThread implements vscode.CommentThread {
this
.
_commentController
.
handle
,
this
.
handle
,
this
.
_id
,
this
.
_
resource
,
this
.
_
uri
,
commentThreadRange
,
label
,
comments
,
...
...
@@ -717,6 +721,7 @@ function convertFromCommentThread(commentThread: modes.CommentThread): vscode.Co
return
{
id
:
commentThread
.
threadId
!
,
threadId
:
commentThread
.
threadId
!
,
uri
:
URI
.
parse
(
commentThread
.
resource
!
),
resource
:
URI
.
parse
(
commentThread
.
resource
!
),
range
:
extHostTypeConverter
.
Range
.
to
(
commentThread
.
range
),
comments
:
commentThread
.
comments
?
commentThread
.
comments
.
map
(
convertFromComment
)
:
[],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录