代码之家  ›  专栏  ›  技术社区  ›  leonard chan

完成命令处理程序

  •  0
  • leonard chan  · 技术社区  · 9 年前

    在他们要求建造的现场 TestCompletionCommandHandler类 。在“实现完成命令处理程序提供程序”下。

    然而,关于实现完成命令处理程序。它要求创建另一个同名的类名, TestCompletionCommandHandler类 .

    问题

    1. 哪个是正确的类名?

    非常感谢。

    1 回复  |  直到 9 年前
        1
  •  1
  •   Sir Rufo    9 年前

    这是该网站的一个引用(我希望你正在谈论)

    Walkthrough: Displaying Statement Completion

    实现完成命令处理程序提供程序

    1. 添加名为的文件 测试完成命令处理程序 .
    2. 添加名为的类 测试完成处理程序提供程序 实现 IVsTextViewCreationListener .

    实现完成命令处理程序

    实现完成命令处理程序

    1. 添加名为的类 测试完成命令处理程序 实现 IOleCommandTarget :

    说明很清楚,你应该以 一个文件 命名 测试完成命令处理程序.cs 包含 两个班级

    [Export(typeof(IVsTextViewCreationListener))]
    [Name("token completion handler")]
    [ContentType("plaintext")]
    [TextViewRole(PredefinedTextViewRoles.Editable)]
    internal class TestCompletionHandlerProvider : IVsTextViewCreationListener
    {
        // implementation
    }
    
    internal class TestCompletionCommandHandler : IOleCommandTarget
    {
       // implementation 
    }