private bool TryGetClassName(out string className) { int position = TextView.Caret.Position.BufferPosition.Position; className = HtmlHelpers.GetSinglePropertyValue(_tree, position, "class"); return(!string.IsNullOrEmpty(className)); }
public void AugmentPeekSession(IPeekSession session, IList <IPeekableItem> peekableItems) { var triggerPoint = session.GetTriggerPoint(_textBuffer.CurrentSnapshot); if (!triggerPoint.HasValue) { return; } string id = HtmlHelpers.GetSinglePropertyValue(_textBuffer, triggerPoint.Value.Position, "id"); if (string.IsNullOrEmpty(id)) { return; } peekableItems.Add(new IdDefinitionPeekItem(id, _peekResultFactory, _textBuffer)); }