private IdentifierTooltipContent TryPresentColorized(PresentableNode presentableNode, [NotNull] IContextBoundSettingsStore settings) { ITreeNode node = presentableNode.Node; if (node == null) { return(null); } HighlighterIdProvider highlighterIdProvider = _highlighterIdProviderFactory.CreateProvider(settings); RichText identifierText = _colorizerPresenter.TryPresent( node, PresenterOptions.ForIdentifierToolTip(settings, true), node.Language, highlighterIdProvider); if (identifierText == null || identifierText.IsEmpty) { return(null); } var identifierContent = new IdentifierTooltipContent(identifierText, node.GetDocumentRange().TextRange); if (settings.GetValue((IdentifierTooltipSettings s) => s.ShowIcon)) { identifierContent.Icon = presentableNode.Icon; } return(identifierContent); }
public PresentableInfo(PresentableNode presentableNode) { DeclaredElementInfo = null; PresentableNode = presentableNode; }
public PresentableInfo([CanBeNull] DeclaredElementInfo declaredElementInfo) { DeclaredElementInfo = declaredElementInfo; PresentableNode = default; }