当前位置: 首页>>代码示例>>C#>>正文


C# IVsTextView.RemoveCommandFilter方法代码示例

本文整理汇总了C#中IVsTextView.RemoveCommandFilter方法的典型用法代码示例。如果您正苦于以下问题:C# IVsTextView.RemoveCommandFilter方法的具体用法?C# IVsTextView.RemoveCommandFilter怎么用?C# IVsTextView.RemoveCommandFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IVsTextView的用法示例。


在下文中一共展示了IVsTextView.RemoveCommandFilter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: VsTextViewCreated

        public async void VsTextViewCreated(IVsTextView textViewAdapter)
        {
            IWpfTextView view = AdaptersFactory.GetWpfTextView(textViewAdapter);
            Debug.Assert(view != null);

            int tries = 0;

            // Ugly ugly hack
            // Keep trying to register our filter until after the JSLS CommandFilter
            // is added so we can catch completion before JSLS swallows all of them.
            // To confirm this, click Debug, New Breakpoint, Break at Function, type
            // Microsoft.VisualStudio.JSLS.TextView.TextView.CreateCommandFilter,
            // then make sure that our last filter is added after that runs.
            JsCommandFilter filter = new JsCommandFilter(view, CompletionBroker, _standardClassifications);
            while (true)
            {
                IOleCommandTarget next;
                textViewAdapter.AddCommandFilter(filter, out next);
                filter.Next = next;

                if (IsJSLSInstalled(next) || ++tries > 10)
                    return;
                await Task.Delay(500);
                textViewAdapter.RemoveCommandFilter(filter);    // Remove the too-early filter and try again.
            }
        }
开发者ID:Russe11,项目名称:WebEssentials2013,代码行数:26,代码来源:JavaScriptCompletionController.cs

示例2: OnActiveViewChanged

 /// <summary>
 /// Called when [active view changed].
 /// </summary>
 /// <param name="textView">The text view.</param>
 public override void OnActiveViewChanged(IVsTextView textView)
 {
     base.OnActiveViewChanged(textView);
     //Currently filters is not used.
     if (textView != null)
     {
         IOleCommandTarget target;
         LuaCommandFilter commandFilter = LuaCommandFilter.GetCommandFilter(this);
         textView.RemoveCommandFilter(commandFilter);
         textView.AddCommandFilter(commandFilter, out target);
         commandFilter.VsCommandFilter = target;
     }
     else
     {
         //textView.RemoveCommandFilter()
     }
 }
开发者ID:jda808,项目名称:NPL,代码行数:21,代码来源:LanguageService.cs

示例3: RemoveKeyBindingFilter

 private void RemoveKeyBindingFilter(IVsTextView vsTextView)
 {
     vsTextView.RemoveCommandFilter(_keyBindingCommandFilter);
 }
开发者ID:BenHall,项目名称:lonestar,代码行数:4,代码来源:StepsIntellisenseProcessor.cs


注:本文中的IVsTextView.RemoveCommandFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。