Exemplo n.º 1
0
 public override void Init(IVsTextView textView, Declarations declarations, bool completeWord)
 {
     view = textView as TextViewWrapper;
     base.Init(textView, declarations, completeWord);
 }
Exemplo n.º 2
0
 public virtual void Dismiss(){
   this.displayed = false;
   this.decls = null;
   this.textView = null;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
    }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
 internal void SetDeclarations(Declarations declarations)
 {
     _declarations = declarations;
 }