internal static void UpdateWindow(CompletionTextEditorExtension textEditorExtension, ICompletionWidget completionWidget)
        {
            // Updates the parameter information window from the information
            // of the current method overload
            if (methods.Count > 0)
            {
                if (window == null)
                {
                    window                = new ParameterInformationWindow();
                    window.Ext            = textEditorExtension;
                    window.Widget         = completionWidget;
                    window.SizeAllocated += delegate(object o, SizeAllocatedArgs args) {
                        if (args.Allocation.Width == lastW && args.Allocation.Height == lastH && wasVisi == CompletionWindowManager.IsVisible)
                        {
                            return;
                        }
                        PositionParameterInfoWindow(args.Allocation);
                    };
                    window.Hidden += delegate {
                        lastW = -1;
                        lastH = -1;
                    };
                }
                else
                {
                    window.Ext    = textEditorExtension;
                    window.Widget = completionWidget;
                }
                wasAbove = false;
                var lastMethod = methods [methods.Count - 1];
                int curParam   = window.Ext != null?window.Ext.GetCurrentParameterIndex(lastMethod.MethodProvider.StartOffset) : 0;

                var geometry2 = DesktopService.GetUsableMonitorGeometry(window.Screen, window.Screen.GetMonitorAtPoint(X, Y));
                window.ShowParameterInfo(lastMethod.MethodProvider, lastMethod.CurrentOverload, curParam - 1, geometry2.Width);
                PositionParameterInfoWindow(window.Allocation);
                window.Show();
            }

            if (methods.Count == 0)
            {
                if (window != null)
                {
                    window.HideParameterInfo();
//					DestroyWindow ();
                    wasAbove = false;
                    wasVisi  = false;
                    lastW    = -1;
                    lastH    = -1;
                }
                return;
            }
        }
        internal static async void UpdateWindow(CompletionTextEditorExtension textEditorExtension, ICompletionWidget completionWidget)
        {
            // Updates the parameter information window from the information
            // of the current method overload
            if (currentMethodGroup != null)
            {
                if (window == null)
                {
                    window                = new ParameterInformationWindow();
                    window.Ext            = textEditorExtension;
                    window.Widget         = completionWidget;
                    window.BoundsChanged += (o, args) => {
                        if (window.Size.Width == lastW && window.Size.Height == lastH && wasCompletionWindowVisible == (CompletionWindowManager.Wnd?.Visible ?? false))
                        {
                            return;
                        }
                        PositionParameterInfoWindow(window.ScreenBounds);
                    };
                    window.Hidden += delegate {
                        lastW = -1;
                        lastH = -1;
                    };
                }
                else
                {
                    window.Ext    = textEditorExtension;
                    window.Widget = completionWidget;
                }

                wasAbove = false;
                int curParam = window.Ext != null ? await window.Ext.GetCurrentParameterIndex(currentMethodGroup.MethodProvider.StartOffset) : 0;

                var geometry2 = window.Visible ? window.Screen.VisibleBounds.Width : 480;
                window.ShowParameterInfo(currentMethodGroup.MethodProvider, currentMethodGroup.CurrentOverload, curParam - 1, (int)geometry2);
                PositionParameterInfoWindow(window.ScreenBounds);
            }

            if (currentMethodGroup == null)
            {
                if (window != null)
                {
                    window.HideParameterInfo();
//					DestroyWindow ();
                    wasAbove = false;
                    wasCompletionWindowVisible = false;
                    lastW = -1;
                    lastH = -1;
                }
                return;
            }
        }
        internal static async void UpdateWindow(CompletionTextEditorExtension textEditorExtension, ICompletionWidget completionWidget)
        {
            // Updates the parameter information window from the information
            // of the current method overload
            if (currentMethodGroup != null)
            {
                if (window == null)
                {
                    window                = new ParameterInformationWindow();
                    window.Ext            = textEditorExtension;
                    window.Widget         = completionWidget;
                    window.SizeAllocated += delegate(object o, SizeAllocatedArgs args) {
                        if (args.Allocation.Width == lastW && args.Allocation.Height == lastH && wasCompletionWindowVisible == (CompletionWindowManager.Wnd?.Visible ?? false))
                        {
                            return;
                        }
                        PositionParameterInfoWindow(args.Allocation);
                    };
                    window.Hidden += delegate {
                        lastW = -1;
                        lastH = -1;
                    };
                }
                else
                {
                    window.Ext    = textEditorExtension;
                    window.Widget = completionWidget;
                }
                wasAbove = false;
                int curParam = window.Ext != null ? await window.Ext.GetCurrentParameterIndex(currentMethodGroup.MethodProvider.StartOffset) : 0;

                var geometry2 = DesktopService.GetUsableMonitorGeometry(window.Screen.Number, window.Screen.GetMonitorAtPoint(X, Y));
                window.ShowParameterInfo(currentMethodGroup.MethodProvider, currentMethodGroup.CurrentOverload, curParam - 1, (int)geometry2.Width);
                PositionParameterInfoWindow(window.Allocation);
            }

            if (currentMethodGroup == null)
            {
                if (window != null)
                {
                    window.HideParameterInfo();
//					DestroyWindow ();
                    wasAbove = false;
                    wasCompletionWindowVisible = false;
                    lastW = -1;
                    lastH = -1;
                }
                return;
            }
        }
        internal static void UpdateWindow(CompletionTextEditorExtension textEditorExtension, ICompletionWidget completionWidget)
        {
            // Updates the parameter information window from the information
            // of the current method overload
            if (currentMethodGroup != null)
            {
                if (window == null)
                {
                    window                = new ParameterInformationWindow();
                    window.Ext            = textEditorExtension;
                    window.Widget         = completionWidget;
                    window.BoundsChanged += WindowBoundsChanged;
                    window.Hidden        += delegate {
                        lastW = -1;
                        lastH = -1;
                    };
                }
                else
                {
                    window.Ext    = textEditorExtension;
                    window.Widget = completionWidget;
                }

                wasAbove = false;
                PositionParameterInfoWindow();
            }

            if (currentMethodGroup == null)
            {
                if (window != null)
                {
                    window.HideParameterInfo();
//					DestroyWindow ();
                    wasAbove = false;
                    wasCompletionWindowVisible = false;
                    lastW = -1;
                    lastH = -1;
                }
                return;
            }
        }