private static int GetCollapsedHintLineCount(IStructureTag tag) { var control = Assert.IsType <ViewHostingControl>(tag.GetCollapsedHintForm()); var view = control.TextView_TestOnly; try { return(view.TextSnapshot.LineCount); } finally { view.Close(); } }
public static string GetString(this ISegment segment, bool includeSegments = false) { var textVisitor = new TextCollectionVisitor(includeSegments); foreach (var item in segment) { IStructureTag stag = item as IStructureTag; if (stag != null) { continue; } item.AcceptVisitor(textVisitor); } return(textVisitor.CollectedText); }
private static string GetHeaderText(IStructureTag namespaceTag) { return(namespaceTag.Snapshot.GetText(namespaceTag.HeaderSpan.Value)); }