コード例 #1
0
ファイル: Source.cs プロジェクト: svick/visualfsharp
 public void OnDismiss()
 {
     this.textView = null;
     this.methods = null;
     if (nativeStringsCacheForOverloads != null)
     {
         nativeStringsCacheForOverloads.Free();
         nativeStringsCacheForOverloads = null;
     }
     this.currentMethod = 0;
     this.currentParameter = 0;
     this.displayed = false;
 }
コード例 #2
0
ファイル: Source.cs プロジェクト: svick/visualfsharp
 public void Refresh(IVsTextView textView, MethodListForAMethodTip methods, TextSpan context, MethodTipMiscellany methodTipMiscellany)
 {
     bool needToDismissNow = false;
     if (this.displayed && methodTipMiscellany == MethodTipMiscellany.JustPressedBackspace
         && MethodsSeemToDiffer(this.methods, methods))
     {
         // We just hit backspace, and apparently the 'set of methods' changed.  This most commonly happens in a case like
         //     foo(42, bar(    // in a tip for bar(), now press backspace
         //     foo(42, bar     // now we're in a location where we'd be in a tip for foo()
         // and we want to dismiss the tip.
         needToDismissNow = true;
     }
     this.methods = methods;
     if (nativeStringsCacheForOverloads != null)
     {
         nativeStringsCacheForOverloads.Free();
     }
     nativeStringsCacheForOverloads = new NativeStringsCacheForOverloads(methods.GetCount(), this);
     this.context = context;
     this.textView = textView;
     if (needToDismissNow)
     {
         this.Dismiss();
     }
     else
     {
         this.Refresh(methodTipMiscellany);
     }
 }