示例#1
0
 public override void Init(IVsTextView textView, Declarations declarations, bool completeWord)
 {
     view = textView as TextViewWrapper;
     base.Init(textView, declarations, completeWord);
 }
示例#2
0
 public virtual void Dismiss(){
   this.displayed = false;
   this.decls = null;
   this.textView = null;
 }
示例#3
0
 public virtual void Close(){
   if (this.displayed && this.textView != null){
     textView.UpdateCompletionStatus(null, 0 );
   }
   this.displayed = false;
   this.textView = null;
   this.decls = null;
 }
示例#4
0
    public virtual void Init(IVsTextView textView, Declarations decls, bool completeWord){
      
      Close();

      this.textView = textView;
      this.decls = decls;
      this.completeWord = completeWord;

      //check if we have members
      long count = decls.GetCount();
      if (count <= 0) return ;

      //initialise and refresh      
      UpdateCompletionFlags flags = UpdateCompletionFlags.UCS_NAMESCHANGED;
      if (this.completeWord) flags |= UpdateCompletionFlags.UCS_COMPLETEWORD;

      textView.UpdateCompletionStatus(this, (uint)flags);
      this.displayed = true;
    }
示例#5
0
        /// <include file='doc\Source.uex' path='docs/doc[@for="CompletionSet.Init"]/*' />
        public virtual void Init(IVsTextView textView, Declarations declarations, bool completeWord)
        {
            Close();
            this.textView = textView;
            this.Declarations = declarations;
            this.completeWord = completeWord;

            //check if we have members
            long count = decls.GetCount();
            if (count <= 0) return;

            //initialise and refresh
            UpdateCompletionFlags flags = UpdateCompletionFlags.UCS_NAMESCHANGED;

            if (this.completeWord) flags |= UpdateCompletionFlags.UCS_COMPLETEWORD;

            this.wasUnique = false;

            int hr = textView.UpdateCompletionStatus(this, (uint)flags);
            NativeMethods.ThrowOnFailure(hr);

            this.displayed = (!this.wasUnique || !completeWord);
        }
示例#6
0
 internal void SetDeclarations(Declarations declarations)
 {
     _declarations = declarations;
 }