|
2 | 2 | // System : Sandcastle Help File Builder Visual Studio Package
|
3 | 3 | // File : XmlCommentsLinkQuickInfoSource.cs
|
4 | 4 | // Author : Eric Woodruff ([email protected])
|
5 |
| -// Updated : 06/19/2019 |
| 5 | +// Updated : 09/02/2019 |
6 | 6 | // Note : Copyright 2014-2019, Eric Woodruff, All rights reserved
|
7 | 7 | // Compiler: Microsoft Visual C#
|
8 | 8 | //
|
@@ -107,74 +107,25 @@ public void AugmentQuickInfoSession(IQuickInfoSession session, IList<object> qui
|
107 | 107 |
|
108 | 108 | switch(name)
|
109 | 109 | {
|
110 |
| - case "xml doc tag": |
111 |
| - // Track the last seen element or attribute. The classifier in VS2013 and earlier does |
112 |
| - // not break up the XML comments into elements and attributes so we may get a mix of text |
113 |
| - // in the "tag". |
114 |
| - attrName = tagSpan.GetText(); |
115 |
| - |
116 |
| - // As above, for conceptualLink, the next XML doc attribute will be the target |
117 |
| - if(attrName.StartsWith("<conceptualLink", StringComparison.Ordinal)) |
118 |
| - attrName = "conceptualLink"; |
119 |
| - |
120 |
| - // For token, the next XML doc comment will contain the token name |
121 |
| - if(attrName == "<token>") |
122 |
| - attrName = "token"; |
123 |
| - break; |
124 |
| - |
125 |
| - case "xml doc attribute": |
126 |
| - if(attrName == "conceptualLink" && tagSpan.Contains(triggerPoint.Value) && tagSpan.Length > 2) |
127 |
| - { |
128 |
| - // Drop the quotes from the span |
129 |
| - var span = new SnapshotSpan(tagSpan.Snapshot, tagSpan.Start + 1, tagSpan.Length - 2); |
130 |
| - |
131 |
| -#pragma warning disable VSTHRD010 |
132 |
| - content = this.CreateInfoText(attrName, span.GetText()); |
133 |
| -#pragma warning restore VSTHRD010 |
134 |
| - |
135 |
| - if(content != null) |
136 |
| - { |
137 |
| - applicableToSpan = textBuffer.CurrentSnapshot.CreateTrackingSpan(span, |
138 |
| - SpanTrackingMode.EdgeExclusive); |
139 |
| - |
140 |
| - quickInfoContent.Add(content); |
141 |
| - } |
142 |
| - |
143 |
| - return; |
144 |
| - } |
145 |
| - break; |
146 |
| - |
147 |
| - case "xml doc comment": |
148 |
| - if(attrName == "token" && tagSpan.Contains(triggerPoint.Value) && tagSpan.Length > 1) |
149 |
| - { |
150 |
| - content = this.CreateInfoText(attrName, tagSpan.GetText()); |
151 |
| - |
152 |
| - if(content != null) |
153 |
| - { |
154 |
| - applicableToSpan = textBuffer.CurrentSnapshot.CreateTrackingSpan(tagSpan, |
155 |
| - SpanTrackingMode.EdgeExclusive); |
156 |
| - |
157 |
| - quickInfoContent.Add(content); |
158 |
| - } |
159 |
| - |
160 |
| - return; |
161 |
| - } |
162 |
| - break; |
163 |
| - |
164 |
| - // VS2015 is more specific in its classifications |
165 | 110 | case "xml doc comment - name":
|
166 | 111 | elementName = tagSpan.GetText().Trim();
|
167 | 112 | break;
|
168 | 113 |
|
169 | 114 | case "xml doc comment - attribute name":
|
170 |
| - attrName = identifier = null; |
| 115 | + attrName = tagSpan.GetText().Trim(); |
| 116 | + identifier = null; |
| 117 | + |
| 118 | + if(attrName == "cref") |
| 119 | + attrName = null; |
171 | 120 | break;
|
172 | 121 |
|
173 | 122 | case "xml doc comment - attribute value":
|
174 | 123 | if(elementName == "conceptualLink" && attrName == "target" &&
|
175 | 124 | tagSpan.Contains(triggerPoint.Value) && tagSpan.Length > 1)
|
176 | 125 | {
|
| 126 | +#pragma warning disable VSTHRD010 |
177 | 127 | content = this.CreateInfoText(elementName, tagSpan.GetText());
|
| 128 | +#pragma warning restore VSTHRD010 |
178 | 129 |
|
179 | 130 | if(content != null)
|
180 | 131 | {
|
|
0 commit comments