Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ca4f18dc
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,发现更多精彩内容 >>
提交
ca4f18dc
编写于
5月 17, 2018
作者:
P
Peng Lyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unsed command service and reorder constructor paramaters.
上级
41f17221
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
18 deletion
+11
-18
src/vs/workbench/parts/comments/electron-browser/commentThreadWidget.ts
...ch/parts/comments/electron-browser/commentThreadWidget.ts
+6
-11
src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts
...s/comments/electron-browser/commentsEditorContribution.ts
+5
-7
未找到文件。
src/vs/workbench/parts/comments/electron-browser/commentThreadWidget.ts
浏览文件 @
ca4f18dc
...
@@ -18,7 +18,6 @@ import { ICodeEditor, IEditorMouseEvent, MouseTargetType } from 'vs/editor/brows
...
@@ -18,7 +18,6 @@ import { ICodeEditor, IEditorMouseEvent, MouseTargetType } from 'vs/editor/brows
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
{
peekViewBorder
}
from
'
vs/editor/contrib/referenceSearch/referencesWidget
'
;
import
{
peekViewBorder
}
from
'
vs/editor/contrib/referenceSearch/referencesWidget
'
;
import
{
IOptions
,
ZoneWidget
}
from
'
vs/editor/contrib/zoneWidget/zoneWidget
'
;
import
{
IOptions
,
ZoneWidget
}
from
'
vs/editor/contrib/zoneWidget/zoneWidget
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
attachButtonStyler
}
from
'
vs/platform/theme/common/styler
'
;
import
{
attachButtonStyler
}
from
'
vs/platform/theme/common/styler
'
;
import
{
ITheme
,
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
ITheme
,
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
renderMarkdown
}
from
'
vs/base/browser/htmlContentRenderer
'
;
import
{
renderMarkdown
}
from
'
vs/base/browser/htmlContentRenderer
'
;
...
@@ -107,7 +106,6 @@ export class ReviewZoneWidget extends ZoneWidget {
...
@@ -107,7 +106,6 @@ export class ReviewZoneWidget extends ZoneWidget {
private
_toggleAction
:
Action
;
private
_toggleAction
:
Action
;
private
_commentThread
:
modes
.
CommentThread
;
private
_commentThread
:
modes
.
CommentThread
;
private
_commentGlyph
:
CommentGlyphWidget
;
private
_commentGlyph
:
CommentGlyphWidget
;
private
_replyCommand
:
modes
.
Command
;
private
_owner
:
number
;
private
_owner
:
number
;
private
_decorationIDs
:
string
[];
private
_decorationIDs
:
string
[];
private
_localToDispose
:
IDisposable
[];
private
_localToDispose
:
IDisposable
[];
...
@@ -120,23 +118,20 @@ export class ReviewZoneWidget extends ZoneWidget {
...
@@ -120,23 +118,20 @@ export class ReviewZoneWidget extends ZoneWidget {
}
}
constructor
(
constructor
(
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
private
instantiationService
:
IInstantiationService
,
@
IModeService
private
modeService
:
IModeService
,
private
modeService
:
IModeService
,
@
IModelService
private
modelService
:
IModelService
,
private
modelService
:
IModelService
,
private
themeService
:
IThemeService
,
private
commentService
:
ICommentService
,
editor
:
ICodeEditor
,
editor
:
ICodeEditor
,
owner
:
number
,
owner
:
number
,
commentThread
:
modes
.
CommentThread
,
commentThread
:
modes
.
CommentThread
,
replyCommand
:
modes
.
Command
,
options
:
IOptions
=
{}
options
:
IOptions
=
{},
private
readonly
themeService
:
IThemeService
,
private
readonly
commandService
:
ICommandService
,
private
readonly
commentService
:
ICommentService
)
{
)
{
super
(
editor
,
options
);
super
(
editor
,
options
);
this
.
_resizeObserver
=
null
;
this
.
_resizeObserver
=
null
;
this
.
_owner
=
owner
;
this
.
_owner
=
owner
;
this
.
_commentThread
=
commentThread
;
this
.
_commentThread
=
commentThread
;
this
.
_replyCommand
=
replyCommand
;
this
.
_isCollapsed
=
commentThread
.
collapsibleState
!==
modes
.
CommentThreadCollapsibleState
.
Expanded
;
this
.
_isCollapsed
=
commentThread
.
collapsibleState
!==
modes
.
CommentThreadCollapsibleState
.
Expanded
;
this
.
_decorationIDs
=
[];
this
.
_decorationIDs
=
[];
this
.
_localToDispose
=
[];
this
.
_localToDispose
=
[];
...
...
src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts
浏览文件 @
ca4f18dc
...
@@ -18,7 +18,6 @@ import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
...
@@ -18,7 +18,6 @@ import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
{
peekViewEditorBackground
,
peekViewResultsBackground
,
peekViewResultsSelectionBackground
}
from
'
vs/editor/contrib/referenceSearch/referencesWidget
'
;
import
{
peekViewEditorBackground
,
peekViewResultsBackground
,
peekViewResultsSelectionBackground
}
from
'
vs/editor/contrib/referenceSearch/referencesWidget
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
IContextKey
,
IContextKeyService
,
RawContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IContextKey
,
IContextKeyService
,
RawContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
ServicesAccessor
,
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ServicesAccessor
,
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
...
@@ -79,7 +78,6 @@ export class ReviewController implements IEditorContribution {
...
@@ -79,7 +78,6 @@ export class ReviewController implements IEditorContribution {
editor
:
ICodeEditor
,
editor
:
ICodeEditor
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
IThemeService
private
themeService
:
IThemeService
,
@
IThemeService
private
themeService
:
IThemeService
,
@
ICommandService
private
commandService
:
ICommandService
,
@
ICommentService
private
commentService
:
ICommentService
,
@
ICommentService
private
commentService
:
ICommentService
,
@
INotificationService
private
notificationService
:
INotificationService
,
@
INotificationService
private
notificationService
:
INotificationService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
...
@@ -119,7 +117,7 @@ export class ReviewController implements IEditorContribution {
...
@@ -119,7 +117,7 @@ export class ReviewController implements IEditorContribution {
this
.
_commentInfos
.
forEach
(
info
=>
{
this
.
_commentInfos
.
forEach
(
info
=>
{
info
.
threads
.
forEach
(
thread
=>
{
info
.
threads
.
forEach
(
thread
=>
{
let
zoneWidget
=
new
ReviewZoneWidget
(
this
.
instantiationService
,
this
.
modeService
,
this
.
modelService
,
this
.
editor
,
info
.
owner
,
thread
,
info
.
reply
,
{},
this
.
themeService
,
this
.
commandService
,
this
.
commentService
);
let
zoneWidget
=
new
ReviewZoneWidget
(
this
.
instantiationService
,
this
.
modeService
,
this
.
modelService
,
this
.
themeService
,
this
.
commentService
,
this
.
editor
,
info
.
owner
,
thread
,
{}
);
zoneWidget
.
display
(
thread
.
range
.
startLineNumber
);
zoneWidget
.
display
(
thread
.
range
.
startLineNumber
);
this
.
_commentWidgets
.
push
(
zoneWidget
);
this
.
_commentWidgets
.
push
(
zoneWidget
);
});
});
...
@@ -214,7 +212,7 @@ export class ReviewController implements IEditorContribution {
...
@@ -214,7 +212,7 @@ export class ReviewController implements IEditorContribution {
}
}
});
});
added
.
forEach
(
thread
=>
{
added
.
forEach
(
thread
=>
{
let
zoneWidget
=
new
ReviewZoneWidget
(
this
.
instantiationService
,
this
.
modeService
,
this
.
modelService
,
this
.
editor
,
e
.
owner
,
thread
,
thread
.
reply
,
{},
this
.
themeService
,
this
.
commandService
,
this
.
commentService
);
let
zoneWidget
=
new
ReviewZoneWidget
(
this
.
instantiationService
,
this
.
modeService
,
this
.
modelService
,
this
.
themeService
,
this
.
commentService
,
this
.
editor
,
e
.
owner
,
thread
,
{}
);
zoneWidget
.
display
(
thread
.
range
.
startLineNumber
);
zoneWidget
.
display
(
thread
.
range
.
startLineNumber
);
this
.
_commentWidgets
.
push
(
zoneWidget
);
this
.
_commentWidgets
.
push
(
zoneWidget
);
this
.
_commentInfos
.
filter
(
info
=>
info
.
owner
===
e
.
owner
)[
0
].
threads
.
push
(
thread
);
this
.
_commentInfos
.
filter
(
info
=>
info
.
owner
===
e
.
owner
)[
0
].
threads
.
push
(
thread
);
...
@@ -231,7 +229,7 @@ export class ReviewController implements IEditorContribution {
...
@@ -231,7 +229,7 @@ export class ReviewController implements IEditorContribution {
// add new comment
// add new comment
this
.
_reviewPanelVisible
.
set
(
true
);
this
.
_reviewPanelVisible
.
set
(
true
);
const
{
replyCommand
,
ownerId
}
=
newCommentInfo
;
const
{
replyCommand
,
ownerId
}
=
newCommentInfo
;
this
.
_newCommentWidget
=
new
ReviewZoneWidget
(
this
.
instantiationService
,
this
.
modeService
,
this
.
modelService
,
this
.
editor
,
ownerId
,
{
this
.
_newCommentWidget
=
new
ReviewZoneWidget
(
this
.
instantiationService
,
this
.
modeService
,
this
.
modelService
,
this
.
themeService
,
this
.
commentService
,
this
.
editor
,
ownerId
,
{
threadId
:
null
,
threadId
:
null
,
resource
:
null
,
resource
:
null
,
comments
:
[],
comments
:
[],
...
@@ -243,7 +241,7 @@ export class ReviewController implements IEditorContribution {
...
@@ -243,7 +241,7 @@ export class ReviewController implements IEditorContribution {
},
},
reply
:
replyCommand
,
reply
:
replyCommand
,
collapsibleState
:
CommentThreadCollapsibleState
.
Expanded
,
collapsibleState
:
CommentThreadCollapsibleState
.
Expanded
,
},
replyCommand
,
{},
this
.
themeService
,
this
.
commandService
,
this
.
commentService
);
},
{}
);
this
.
_newCommentWidget
.
onDidClose
(
e
=>
{
this
.
_newCommentWidget
.
onDidClose
(
e
=>
{
this
.
_newCommentWidget
=
null
;
this
.
_newCommentWidget
=
null
;
...
@@ -356,7 +354,7 @@ export class ReviewController implements IEditorContribution {
...
@@ -356,7 +354,7 @@ export class ReviewController implements IEditorContribution {
this
.
_commentInfos
.
forEach
(
info
=>
{
this
.
_commentInfos
.
forEach
(
info
=>
{
info
.
threads
.
forEach
(
thread
=>
{
info
.
threads
.
forEach
(
thread
=>
{
let
zoneWidget
=
new
ReviewZoneWidget
(
this
.
instantiationService
,
this
.
modeService
,
this
.
modelService
,
this
.
editor
,
info
.
owner
,
thread
,
info
.
reply
,
{},
this
.
themeService
,
this
.
commandService
,
this
.
commentService
);
let
zoneWidget
=
new
ReviewZoneWidget
(
this
.
instantiationService
,
this
.
modeService
,
this
.
modelService
,
this
.
themeService
,
this
.
commentService
,
this
.
editor
,
info
.
owner
,
thread
,
{}
);
zoneWidget
.
display
(
thread
.
range
.
startLineNumber
);
zoneWidget
.
display
(
thread
.
range
.
startLineNumber
);
this
.
_commentWidgets
.
push
(
zoneWidget
);
this
.
_commentWidgets
.
push
(
zoneWidget
);
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录