Example #1
0
        private void AddParameterSignatureHelp(int index, SignatureHelpParameter param, Panel headerPanel, Panel contentPanel)
        {
            var isSelected = _signatureHelp.ArgumentIndex == index;

            headerPanel.Children.Add(ToTextBlock(param.DisplayParts, bold: isSelected));
            if (index != _item.Parameters.Length - 1)
            {
                headerPanel.Children.Add(ToTextBlock(_item.SeparatorDisplayParts));
            }
            if (isSelected)
            {
                var textBlock = param.DocumentationFactory(CancellationToken.None).ToTextBlock();
                if (textBlock != null && textBlock.Inlines.Count > 0)
                {
                    contentPanel.Children.Add(new StackPanel
                    {
                        Orientation = Orientation.Horizontal,
                        Children    =
                        {
                            new TextBlock {
                                Text = param.Name + ": ", FontWeight = FontWeights.Bold
                            },
                            textBlock
                        }
                    });
                }
            }
        }
 private static ParameterInformation ConvertParameter(SignatureHelpParameter parameter, CancellationToken cancellationToken)
 {
     return(new ParameterInformation
     {
         Label = parameter.Name,
         Documentation = parameter.DocumentationFactory(cancellationToken).GetFullText()
     });
 }
Example #3
0
 void InitializeDocumentation()
 {
     documentationTaggedText = parameter.DocumentationFactory(CancellationToken.None).ToArray();
     documentation           = ToString(documentationTaggedText);
 }