AbstractBlockCommentEditingCommandHandler.cs 1.2 KB
Newer Older
S
Sam Harwell 已提交
1
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.
2 3 4

using System;
using Microsoft.VisualStudio.Text.Operations;
5 6
using Microsoft.VisualStudio.Commanding;
using Microsoft.VisualStudio.Text.Editor.Commanding.Commands;
7

8
namespace Microsoft.CodeAnalysis.Editor.Implementation.BlockCommentEditing
9
{
D
dotnet-bot 已提交
10
    internal abstract class AbstractBlockCommentEditingCommandHandler : BaseAbstractBlockCommentEditingCommandHandler,
11
        ICommandHandler<ReturnKeyCommandArgs>
12
    {
13
        protected AbstractBlockCommentEditingCommandHandler(
14 15
            ITextUndoHistoryRegistry undoHistoryRegistry,
            IEditorOperationsFactoryService editorOperationsFactoryService)
16
            : base(undoHistoryRegistry, editorOperationsFactoryService)
17 18 19
        {
        }

20
        public string DisplayName => EditorFeaturesResources.Block_Comment_Editing;
21

22
        public CommandState GetCommandState(ReturnKeyCommandArgs args) => CommandState.Unspecified;
23

24
        public bool ExecuteCommand(ReturnKeyCommandArgs args, CommandExecutionContext context)
25 26
        {
            return TryHandleReturnKey(args.SubjectBuffer, args.TextView);
27 28 29
        }
    }
}