Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
3320a003
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,体验更适合开发者的 AI 搜索 >>
提交
3320a003
编写于
3月 24, 2020
作者:
S
SteVen Batten
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enable comments panel move
上级
3b155031
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
5 deletion
+10
-5
src/vs/workbench/api/browser/mainThreadComments.ts
src/vs/workbench/api/browser/mainThreadComments.ts
+2
-0
src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts
.../workbench/contrib/comments/browser/commentsTreeViewer.ts
+7
-4
src/vs/workbench/contrib/comments/browser/commentsView.ts
src/vs/workbench/contrib/comments/browser/commentsView.ts
+1
-1
未找到文件。
src/vs/workbench/api/browser/mainThreadComments.ts
浏览文件 @
3320a003
...
...
@@ -452,6 +452,7 @@ export class MainThreadComments extends Disposable implements MainThreadComments
id
:
COMMENTS_VIEW_ID
,
name
:
COMMENTS_VIEW_TITLE
,
ctorDescriptor
:
new
SyncDescriptor
(
ViewPaneContainer
,
[
COMMENTS_VIEW_ID
,
COMMENTS_VIEW_TITLE
,
{
mergeViewWithContainerWhenSingleView
:
true
,
donotShowContainerTitleWhenMergedWithContainer
:
true
}]),
hideIfEmpty
:
true
,
order
:
10
,
},
ViewContainerLocation
.
Panel
);
...
...
@@ -460,6 +461,7 @@ export class MainThreadComments extends Disposable implements MainThreadComments
name
:
COMMENTS_VIEW_TITLE
,
canToggleVisibility
:
false
,
ctorDescriptor
:
new
SyncDescriptor
(
CommentsPanel
),
canMoveView
:
true
,
focusCommand
:
{
id
:
'
workbench.action.focusCommentsPanel
'
}
...
...
src/vs/workbench/contrib/comments/browser/commentsTreeViewer.ts
浏览文件 @
3320a003
...
...
@@ -20,7 +20,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import
{
WorkbenchAsyncDataTree
,
IListService
}
from
'
vs/platform/list/browser/listService
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
PANEL_BACKGROUND
}
from
'
vs/workbench/common/theme
'
;
import
{
IColorMapping
}
from
'
vs/platform/theme/common/styler
'
;
export
const
COMMENTS_VIEW_ID
=
'
workbench.panel.comments
'
;
export
const
COMMENTS_VIEW_TITLE
=
'
Comments
'
;
...
...
@@ -149,10 +149,15 @@ export class CommentNodeRenderer implements IListRenderer<ITreeNode<CommentNode>
}
}
export
interface
ICommentsListOptions
{
overrideStyles
?:
IColorMapping
;
}
export
class
CommentsList
extends
WorkbenchAsyncDataTree
<
any
,
any
>
{
constructor
(
labels
:
ResourceLabels
,
container
:
HTMLElement
,
options
:
ICommentsListOptions
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
IListService
listService
:
IListService
,
@
IThemeService
themeService
:
IThemeService
,
...
...
@@ -202,9 +207,7 @@ export class CommentsList extends WorkbenchAsyncDataTree<any, any> {
collapseByDefault
:
()
=>
{
return
false
;
},
overrideStyles
:
{
listBackground
:
PANEL_BACKGROUND
}
overrideStyles
:
options
.
overrideStyles
},
contextKeyService
,
listService
,
...
...
src/vs/workbench/contrib/comments/browser/commentsView.ts
浏览文件 @
3320a003
...
...
@@ -149,7 +149,7 @@ export class CommentsPanel extends ViewPane {
private
createTree
():
void
{
this
.
treeLabels
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
ResourceLabels
,
this
));
this
.
tree
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
CommentsList
,
this
.
treeLabels
,
this
.
treeContainer
));
this
.
tree
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
CommentsList
,
this
.
treeLabels
,
this
.
treeContainer
,
{
overrideStyles
:
{
listBackground
:
this
.
getBackgroundColor
()
}
}
));
const
commentsNavigator
=
this
.
_register
(
ResourceNavigator
.
createTreeResourceNavigator
(
this
.
tree
,
{
openOnFocus
:
true
}));
this
.
_register
(
commentsNavigator
.
onDidOpenResource
(
e
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录