Ejemplo n.º 1
0
        protected override Window CreateTooltipWindow(TextEditor editor, int offset, Gdk.ModifierType modifierState, TooltipItem item)
        {
            var doc = IdeApp.Workbench.ActiveDocument;

            if (doc == null)
            {
                return(null);
            }

            var titem = item.Item as AbstractType;

            if (titem == null)
            {
                return(null);
            }

            var result = new TooltipInformationWindow();

            result.ShowArrow = true;

            foreach (var i in AmbiguousType.TryDissolve(titem))
            {
                if (i == null)
                {
                    continue;
                }
                var tooltipInformation = TooltipInfoGen.Create(i, editor.ColorStyle);
                if (tooltipInformation != null && !string.IsNullOrEmpty(tooltipInformation.SignatureMarkup))
                {
                    result.AddOverload(tooltipInformation);
                }
            }

            if (result.Overloads < 1)
            {
                result.Dispose();
                return(null);
            }

            result.RepositionWindow();
            return(result);
        }
Ejemplo n.º 2
0
 public MonoDevelop.Ide.CodeCompletion.TooltipInformation GetTooltip(int item)
 {
     return(TooltipInfoGen.Create(Symbols[item] as DNode, Mono.TextEditor.Highlighting.SyntaxModeService.GetColorStyle(MonoDevelop.Ide.IdeApp.Preferences.ColorScheme)));
 }