public bool DecorateNode(IResource res, JetBrains.UI.RichText.RichText nodeText) { bool need2Decor = res.HasProp(Core.Props.LastError); if (need2Decor) { nodeText.SetStyle(TextStyle.EffectStyle.WeavyUnderline, Color.Red, 0, nodeText.Length); nodeText.SetColors(Color.Red, SystemColors.Window, 0, nodeText.Length); } return(need2Decor); }
private RichText CreateRichTextFromParts(RichString[] parts) { if (parts.Length == 0) { return(new RichText("", myParameters)); } string text = ""; int startOffset = parts[0].Offset; foreach (RichString s in parts) { text += Text.Substring(s.Offset, s.Length); } RichText result = new RichText(text, myParameters); foreach (RichString s in parts) { result.SetStyle(s.Style, s.Offset - startOffset, s.Length); } return(result); }