提交 c667cd4f 编写于 作者: D Dustin Campbell

Implement 'do nothing' command handlers for OpenLineAbove and OpenLineBelow for XML doc comments

上级 91f4c804
......@@ -21,7 +21,9 @@ namespace Microsoft.CodeAnalysis.Editor.Implementation.DocumentationComments
internal abstract class AbstractDocumentationCommentCommandHandler<TDocumentationComment, TMemberNode> :
ICommandHandler<TypeCharCommandArgs>,
ICommandHandler<ReturnKeyCommandArgs>,
ICommandHandler<InsertCommentCommandArgs>
ICommandHandler<InsertCommentCommandArgs>,
ICommandHandler<OpenLineAboveCommandArgs>,
ICommandHandler<OpenLineBelowCommandArgs>
where TDocumentationComment : SyntaxNode, IStructuredTriviaSyntax
where TMemberNode : SyntaxNode
{
......@@ -587,5 +589,25 @@ public void ExecuteCommand(InsertCommentCommandArgs args, Action nextHandler)
}
});
}
public CommandState GetCommandState(OpenLineAboveCommandArgs args, Func<CommandState> nextHandler)
{
return nextHandler();
}
public void ExecuteCommand(OpenLineAboveCommandArgs args, Action nextHandler)
{
nextHandler();
}
public CommandState GetCommandState(OpenLineBelowCommandArgs args, Func<CommandState> nextHandler)
{
return nextHandler();
}
public void ExecuteCommand(OpenLineBelowCommandArgs args, Action nextHandler)
{
nextHandler();
}
}
}
......@@ -71,7 +71,11 @@ protected void VerifyOpenLineAbove(string initialMarkup, string expectedMarkup)
var commandHandler = CreateCommandHandler(TestWaitIndicator.Default, undoHistoryRegistry, editorOperationsFactoryService, completionService) as ICommandHandler<OpenLineAboveCommandArgs>;
var commandArgs = new OpenLineAboveCommandArgs(view, view.TextBuffer);
Action nextHandler = delegate { };
Action nextHandler = () =>
{
var editorOperations = editorOperationsFactoryService.GetEditorOperations(view);
editorOperations.OpenLineAbove();
};
commandHandler.ExecuteCommand(commandArgs, nextHandler);
});
......@@ -84,7 +88,11 @@ protected void VerifyOpenLineBelow(string initialMarkup, string expectedMarkup)
var commandHandler = CreateCommandHandler(TestWaitIndicator.Default, undoHistoryRegistry, editorOperationsFactoryService, completionService) as ICommandHandler<OpenLineBelowCommandArgs>;
var commandArgs = new OpenLineBelowCommandArgs(view, view.TextBuffer);
Action nextHandler = delegate { };
Action nextHandler = () =>
{
var editorOperations = editorOperationsFactoryService.GetEditorOperations(view);
editorOperations.OpenLineBelow();
};
commandHandler.ExecuteCommand(commandArgs, nextHandler);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册