private void UpdateCompleteListFilter()
        {
            if (completeList == null || committing)
            {
                return;
            }

            if (OnCodeCompleteUpdating != null)
            {
                OnCodeCompleteUpdating(currentSession);

                if (completeList == null)
                {
                    return;//wtf
                }
                completeList.SetResults(currentSession.FilteredCompletionSet.ToList());
            }
        }
        private void InitiateCodeComplete()
        {
            //todo: check if happens in right window

            DismissCodeComplete();

            currentSession = new CompletionSession {
                LineNumber = VisualStudio.GetCurrentLineNumber()
            };

            OnCodeCompleteActivating(currentSession);

            if (currentSession.Cancel)
            {
                CloseCodeComplete();
                return;
            }

            if (currentSession.FilteredCompletionSet.Count() == 1) //only one item in list, commit directly
            {
                CommitCodeComplete(currentSession.FilteredCompletionSet.First().ToString());
            }
            else //zero, or more than 1 items
            {
                completeList = new StatementCompleteList {
                    Left = currentSession.Coordinate.X, Top = currentSession.Coordinate.Y
                };
                completeList.SetResults(currentSession.FilteredCompletionSet.ToList());
                completeList.SetSignatureToolTip(currentSession.SignatureToolTip);
                completeList.Deactivate   += new EventHandler(CompleteListDeactivate);
                completeList.FormClosing  += new FormClosingEventHandler(CompleteListFormClosing);
                completeList.ItemSelected += new EventHandler(CompleteListItemSelected);
                completeList.Show();
                return;
            }
        }