Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
21b0059b
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,发现更多精彩内容 >>
提交
21b0059b
编写于
12月 13, 2018
作者:
R
Rachel Macfarlane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support completions in comment editors
上级
48e3f6c8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
15 deletion
+13
-15
src/vs/workbench/parts/comments/electron-browser/commentNode.ts
.../workbench/parts/comments/electron-browser/commentNode.ts
+1
-1
src/vs/workbench/parts/comments/electron-browser/commentThreadWidget.ts
...ch/parts/comments/electron-browser/commentThreadWidget.ts
+1
-1
src/vs/workbench/parts/comments/electron-browser/simpleCommentEditor.ts
...ch/parts/comments/electron-browser/simpleCommentEditor.ts
+11
-13
未找到文件。
src/vs/workbench/parts/comments/electron-browser/commentNode.ts
浏览文件 @
21b0059b
...
...
@@ -131,7 +131,7 @@ export class CommentNode extends Disposable {
const
container
=
dom
.
append
(
this
.
_commentEditContainer
,
dom
.
$
(
'
.edit-textarea
'
));
this
.
_commentEditor
=
this
.
instantiationService
.
createInstance
(
SimpleCommentEditor
,
container
,
SimpleCommentEditor
.
getEditorOptions
());
const
resource
=
URI
.
parse
(
`comment:commentinput-
${
this
.
comment
.
commentId
}
-
${
Date
.
now
()}
.md`
);
this
.
_commentEditorModel
=
this
.
modelService
.
createModel
(
''
,
this
.
modeService
.
createByFilepathOrFirstLine
(
resource
.
path
),
resource
,
tru
e
);
this
.
_commentEditorModel
=
this
.
modelService
.
createModel
(
''
,
this
.
modeService
.
createByFilepathOrFirstLine
(
resource
.
path
),
resource
,
fals
e
);
this
.
_commentEditor
.
setModel
(
this
.
_commentEditorModel
);
this
.
_commentEditor
.
setValue
(
this
.
comment
.
body
.
value
);
...
...
src/vs/workbench/parts/comments/electron-browser/commentThreadWidget.ts
浏览文件 @
21b0059b
...
...
@@ -306,7 +306,7 @@ export class ReviewZoneWidget extends ZoneWidget {
this
.
_commentEditor
=
this
.
instantiationService
.
createInstance
(
SimpleCommentEditor
,
this
.
_commentForm
,
SimpleCommentEditor
.
getEditorOptions
());
const
modeId
=
hasExistingComments
?
this
.
_commentThread
.
threadId
:
++
INMEM_MODEL_ID
;
const
resource
=
URI
.
parse
(
`
${
COMMENT_SCHEME
}
:commentinput-
${
modeId
}
.md`
);
const
model
=
this
.
modelService
.
createModel
(
this
.
_pendingComment
||
''
,
this
.
modeService
.
createByFilepathOrFirstLine
(
resource
.
path
),
resource
,
tru
e
);
const
model
=
this
.
modelService
.
createModel
(
this
.
_pendingComment
||
''
,
this
.
modeService
.
createByFilepathOrFirstLine
(
resource
.
path
),
resource
,
fals
e
);
this
.
_localToDispose
.
push
(
model
);
this
.
_commentEditor
.
setModel
(
model
);
this
.
_localToDispose
.
push
(
this
.
_commentEditor
);
...
...
src/vs/workbench/parts/comments/electron-browser/simpleCommentEditor.ts
浏览文件 @
21b0059b
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
{
IEditorOptions
}
from
'
vs/editor/common/config/editorOptions
'
;
import
{
EditorAction
,
EditorExtensionsRegistry
,
IEditorContributionCtor
}
from
'
vs/editor/browser/editorExtensions
'
;
import
{
EditorAction
,
EditorExtensionsRegistry
}
from
'
vs/editor/browser/editorExtensions
'
;
import
{
ICodeEditorService
}
from
'
vs/editor/browser/services/codeEditorService
'
;
import
{
CodeEditorWidget
}
from
'
vs/editor/browser/widget/codeEditorWidget
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
...
...
@@ -13,7 +13,6 @@ import { ICommandService } from 'vs/platform/commands/common/commands';
// Allowed Editor Contributions:
import
{
MenuPreventer
}
from
'
vs/workbench/parts/codeEditor/browser/menuPreventer
'
;
import
{
SelectionClipboard
}
from
'
vs/workbench/parts/codeEditor/electron-browser/selectionClipboard
'
;
import
{
ContextMenuController
}
from
'
vs/editor/contrib/contextmenu/contextmenu
'
;
import
{
SuggestController
}
from
'
vs/editor/contrib/suggest/suggestController
'
;
import
{
SnippetController2
}
from
'
vs/editor/contrib/snippet/snippetController2
'
;
...
...
@@ -32,18 +31,17 @@ export class SimpleCommentEditor extends CodeEditorWidget {
@
IThemeService
themeService
:
IThemeService
,
@
INotificationService
notificationService
:
INotificationService
,
)
{
super
(
domElement
,
options
,
{
isSimpleWidget
:
true
},
instantiationService
,
codeEditorService
,
commandService
,
contextKeyService
,
themeService
,
notificationService
);
}
const
codeEditorWidgetOptions
=
{
contributions
:
[
MenuPreventer
,
ContextMenuController
,
SuggestController
,
SnippetController2
,
TabCompletionController
,
]
};
protected
_getContributions
():
IEditorContributionCtor
[]
{
return
[
MenuPreventer
,
SelectionClipboard
,
ContextMenuController
,
SuggestController
,
SnippetController2
,
TabCompletionController
,
];
super
(
domElement
,
options
,
codeEditorWidgetOptions
,
instantiationService
,
codeEditorService
,
commandService
,
contextKeyService
,
themeService
,
notificationService
);
}
protected
_getActions
():
EditorAction
[]
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录