Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
52dada35
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
52dada35
编写于
3月 27, 2019
作者:
D
David Barbet
提交者:
David Barbet
4月 01, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Switch to new toggle block comment command handler.
上级
f60304d1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
9 deletion
+11
-9
src/EditorFeatures/CSharp/CommentSelection/CSharpToggleBlockCommentCommandHandler.cs
...ommentSelection/CSharpToggleBlockCommentCommandHandler.cs
+1
-2
src/EditorFeatures/Core/Extensibility/Commands/PredefinedCommandHandlerNames.cs
...e/Extensibility/Commands/PredefinedCommandHandlerNames.cs
+6
-0
src/EditorFeatures/Core/Implementation/CommentSelection/AbstractToggleBlockCommentBase.cs
...tation/CommentSelection/AbstractToggleBlockCommentBase.cs
+3
-5
src/EditorFeatures/Core/Implementation/CommentSelection/ToggleBlockCommentCommandHandler.cs
...tion/CommentSelection/ToggleBlockCommentCommandHandler.cs
+1
-2
未找到文件。
src/EditorFeatures/CSharp/CommentSelection/CSharpToggleBlockCommentCommandHandler.cs
浏览文件 @
52dada35
...
...
@@ -21,8 +21,7 @@ namespace Microsoft.CodeAnalysis.Editor.CSharp.CommentSelection
{
[
Export
(
typeof
(
VSCommanding
.
ICommandHandler
))]
[
ContentType
(
ContentTypeNames
.
CSharpContentType
)]
// TODO - Change to toggle handler.
[
Name
(
PredefinedCommandHandlerNames
.
CommentSelection
)]
[
Name
(
PredefinedCommandHandlerNames
.
ToggleBlockComment
)]
internal
class
CSharpToggleBlockCommentCommandHandler
:
ToggleBlockCommentCommandHandler
{
...
...
src/EditorFeatures/Core/Extensibility/Commands/PredefinedCommandHandlerNames.cs
浏览文件 @
52dada35
...
...
@@ -141,6 +141,12 @@ internal static class PredefinedCommandHandlerNames
/// </summary>
public
const
string
SignatureHelpAfterCompletion
=
"Signature Help After Completion Command Handler"
;
/// <summary>
/// Command handler name for Toggle Block Comments.
/// </summary>
/// <remarks></remarks>
public
const
string
ToggleBlockComment
=
"Toggle Block Comment Command Handler"
;
/// <summary>
/// Command handler name for Paste Content in Interactive Format.
/// </summary>
...
...
src/EditorFeatures/Core/Implementation/CommentSelection/AbstractToggleBlockCommentBase.cs
浏览文件 @
52dada35
...
...
@@ -25,7 +25,7 @@ namespace Microsoft.CodeAnalysis.Editor.Implementation.CommentSelection
internal
abstract
class
AbstractToggleBlockCommentBase
:
// Value tuple to represent that there is no distinct command to be passed in.
AbstractCommentSelectionBase
<
ValueTuple
>,
VSCommanding
.
ICommandHandler
<
CommentSelection
CommandArgs
>
VSCommanding
.
ICommandHandler
<
ToggleBlockComment
CommandArgs
>
{
private
static
readonly
CommentSelectionResult
s_emptyCommentSelectionResult
=
new
CommentSelectionResult
(
new
List
<
TextChange
>(),
new
List
<
CommentTrackingSpan
>(),
Operation
.
Uncomment
);
...
...
@@ -47,14 +47,12 @@ internal abstract class AbstractToggleBlockCommentBase :
protected
abstract
Task
<
ImmutableArray
<
TextSpan
>>
GetBlockCommentsInDocument
(
Document
document
,
ITextSnapshot
snapshot
,
CommentSelectionInfo
commentInfo
,
CancellationToken
cancellationToken
);
// TODO - Change to toggle handler.
public
VSCommanding
.
CommandState
GetCommandState
(
CommentSelectionCommandArgs
args
)
public
VSCommanding
.
CommandState
GetCommandState
(
ToggleBlockCommentCommandArgs
args
)
{
return
GetCommandState
(
args
.
SubjectBuffer
);
}
// TODO - Change to toggle handler.
public
bool
ExecuteCommand
(
CommentSelectionCommandArgs
args
,
CommandExecutionContext
context
)
public
bool
ExecuteCommand
(
ToggleBlockCommentCommandArgs
args
,
CommandExecutionContext
context
)
{
return
ExecuteCommand
(
args
.
TextView
,
args
.
SubjectBuffer
,
ValueTuple
.
Create
(),
context
);
}
...
...
src/EditorFeatures/Core/Implementation/CommentSelection/ToggleBlockCommentCommandHandler.cs
浏览文件 @
52dada35
...
...
@@ -20,8 +20,7 @@ namespace Microsoft.CodeAnalysis.Editor.Implementation.CommentSelection
{
[
Export
(
typeof
(
VSCommanding
.
ICommandHandler
))]
[
ContentType
(
ContentTypeNames
.
RoslynContentType
)]
// TODO - Change to toggle handler.
[
Name
(
PredefinedCommandHandlerNames
.
CommentSelection
)]
[
Name
(
PredefinedCommandHandlerNames
.
ToggleBlockComment
)]
internal
class
ToggleBlockCommentCommandHandler
:
AbstractToggleBlockCommentBase
{
[
ImportingConstructor
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录