Example #1
0
//			static int num = 0;
//			int id;
            public OpacityTimer(CompletionListWindow window)
            {
//				id = num++;
                this.window = window;
                Opacity     = 0.0;
                window.declarationviewwindow.Opacity = Opacity;
            }
        public static bool ShowWindow(char firstChar, ICompletionDataList list, ICompletionWidget completionWidget, CodeCompletionContext completionContext, System.Action closedDelegate)
        {
            try {
                if (wnd == null)
                {
                    wnd = new CompletionListWindow();

                    wnd.WordCompleted += HandleWndWordCompleted;
                }
                try {
                    if (!wnd.ShowListWindow(firstChar, list, completionWidget, completionContext, closedDelegate))
                    {
                        if (list is IDisposable)
                        {
                            ((IDisposable)list).Dispose();
                        }
                        DestroyWindow();
                        return(false);
                    }

                    if (ForceSuggestionMode)
                    {
                        wnd.AutoSelect = false;
                    }

                    OnWindowShown(EventArgs.Empty);
                    return(true);
                } catch {                //(Exception ex) {
                    //LoggingService.LogError (ex.ToString ());
                    return(false);
                }
            } finally {
                ParameterInformationWindowManager.UpdateWindow(completionWidget);
            }
        }
Example #3
0
 public virtual void InsertCompletionText(CompletionListWindow window)
 {
     if (CompletionText == GetCurrentWord(window))
     {
         return;
     }
     window.CompletionWidget.SetCompletionText(window.CodeCompletionContext, GetCurrentWord(window), CompletionText);
 }
Example #4
0
        public string GetCurrentWord(CompletionListWindow window)          //static
        {
            //return window.PartialWord;

            int    partialWordLength = window.PartialWord != null ? window.PartialWord.Length : 0;
            int    replaceLength     = window.CodeCompletionContext.TriggerWordLength + partialWordLength - window.InitialWordLength;
            string temp = window.CompletionWidget.GetText(window.CodeCompletionContext.TriggerOffset, window.CodeCompletionContext.TriggerOffset + replaceLength);

            return(temp);

            //return window.CompletionWidget.GetText (window.CodeCompletionContext.TriggerOffset, window.CodeCompletionContext.TriggerOffset + replaceLength);
        }
 static void DestroyWindow()
 {
     isTemplateModes = false;
     if (wnd != null)
     {
         wnd.Destroy();
         ParameterInformationWindowManager.UpdateWindow(wnd.CompletionWidget);
         wnd = null;
     }
     ;
     OnWindowClosed(EventArgs.Empty);
 }