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; }
public void Init(IVsTextView textView, Declarations declarations, bool completeWord) { Close(); this.textView = textView; this.decls = declarations; this.filterText = ""; //check if we have members long count = decls.GetCount(this.filterText); if (count <= 0) return; //initialise and refresh UpdateCompletionFlags flags = UpdateCompletionFlags.UCS_NAMESCHANGED; if (completeWord) flags |= UpdateCompletionFlags.UCS_COMPLETEWORD; this.wasUnique = false; this.initialLine = 0; this.initialIndex = 0; this.haveInitialLineAndIndex = false; int hr = textView.UpdateCompletionStatus(this, (uint)flags); NativeMethods.ThrowOnFailure(hr); this.displayed = (!this.wasUnique || !completeWord); }