public Collapsible(ITrackingSpan underlyingSpan, IOutliningRegionTag tag) { Extent = underlyingSpan; Tag = tag; IsCollapsed = false; }
public Collapsed(ITrackingSpan extent, IOutliningRegionTag tag) : base(extent, tag) { IsCollapsed = true; }
string DisplayStringForTag(ITag tag, out object toolTipContent) { toolTipContent = null; List <string> content = new List <string>(); ClassificationTag classification = tag as ClassificationTag; if (classification != null) { content.Add(classification.ClassificationType.ToString()); } ErrorTag error = tag as ErrorTag; if (error != null) { toolTipContent = error.ToolTipContent; content.Add(error.ErrorType); } IOutliningRegionTag region = tag as IOutliningRegionTag; if (region != null) { toolTipContent = region.CollapsedHintForm; content.Add(string.Format("IsImplementation: {0}, IsDefaultCollapsed: {1}", region.IsImplementation, region.IsDefaultCollapsed)); } TextMarkerTag marker = tag as TextMarkerTag; if (marker != null) { content.Add(marker.Type); } SpaceNegotiatingAdornmentTag snat = tag as SpaceNegotiatingAdornmentTag; if (snat != null) { content.Add(string.Format("TextHeight: {0}, Width: {1}, Affinity: {2}", snat.TextHeight, snat.Width, snat.Affinity)); } IntraTextAdornmentTag itat = tag as IntraTextAdornmentTag; if (itat != null) { content.Add("Content: " + itat.Adornment.ToString()); } IUrlTag url = tag as IUrlTag; if (url != null) { content.Add(url.Url.ToString()); } if (content.Count > 0) { return(string.Join(Environment.NewLine, content)); } else { return(tag?.ToString()); } }