-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed Go To Definition for conceptualLink elements in C# XML comments. Fixes #739. - Removed some invalid tags from the updated reference links in the Open XML and Markdown presentation styles.
- Loading branch information
1 parent
dfc6750
commit df5d44a
Showing
16 changed files
with
87 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
Documentation/SandcastleBuilder/Content/VersionHistory/v2019.9.15.0.aml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<topic id="06a9fd7f-31bb-4bb8-b685-04cc59fc36dd" revisionNumber="1"> | ||
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<introduction> | ||
<para>Release notes for version 2019.9.15.0.</para> | ||
</introduction> | ||
|
||
<section> | ||
<title>Changes in This Release</title> | ||
<content> | ||
|
||
<list class="bullet"> | ||
<listItem> | ||
<para>Removed some invalid tags from the updated reference links in the Open XML and Markdown | ||
presentation styles.</para> | ||
</listItem> | ||
|
||
<listItem> | ||
<para>Added back support for Go To Definition on <codeInline>conceptualLink</codeInline> elements in | ||
XML comments.</para> | ||
</listItem> | ||
</list> | ||
|
||
</content> | ||
</section> | ||
|
||
<relatedTopics> | ||
<link xlink:href="078cc1c7-7995-431e-bf9c-8813becbe8df" /> | ||
</relatedTopics> | ||
|
||
</developerConceptualDocument> | ||
</topic> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
// System : Sandcastle Help File Builder Visual Studio Package | ||
// File : CSharpGoToDefinitionMouseProcessor.cs | ||
// Author : Eric Woodruff ([email protected]) | ||
// Updated : 06/19/2019 | ||
// Updated : 09/02/2019 | ||
// Note : Copyright 2014-2019, Eric Woodruff, All rights reserved | ||
// Compiler: Microsoft Visual C# | ||
// | ||
|
@@ -76,50 +76,16 @@ protected override bool ProcessSpans(SnapshotSpan mousePoint, IList<Classificati | |
// Highlight the span if it matches what we are looking for and it contains the mouse span | ||
switch(name) | ||
{ | ||
case "xml doc tag": | ||
// Track the last seen element or attribute. The classifier in VS2013 and earlier does | ||
// not break up the XML comments into elements and attributes so we may get a mix of text | ||
// in the "tag". | ||
attrName = classification.Span.GetText(); | ||
|
||
// As above, for conceptualLink, the next XML doc attribute will be the target | ||
if(attrName.StartsWith("<conceptualLink", StringComparison.Ordinal)) | ||
attrName = "conceptualLink"; | ||
|
||
// For token, the next XML doc comment will contain the token name | ||
if(attrName == "<token>") | ||
attrName = "token"; | ||
break; | ||
|
||
case "xml doc attribute": | ||
if(attrName == "conceptualLink" && classification.Span.Contains(mousePoint) && | ||
classification.Span.Length > 2) | ||
{ | ||
// Drop the quotes from the span | ||
var span = new SnapshotSpan(classification.Span.Snapshot, classification.Span.Start + 1, | ||
classification.Span.Length - 2); | ||
|
||
if(this.SetHighlightSpan(span, "link")) | ||
return true; | ||
} | ||
break; | ||
|
||
case "xml doc comment": | ||
if(attrName == "token" && classification.Span.Contains(mousePoint) && | ||
classification.Span.Length > 1) | ||
{ | ||
if(this.SetHighlightSpan(classification.Span, "token")) | ||
return true; | ||
} | ||
break; | ||
|
||
// VS2015 is more specific in its classifications | ||
case "xml doc comment - name": | ||
elementName = classification.Span.GetText().Trim(); | ||
break; | ||
|
||
case "xml doc comment - attribute name": | ||
attrName = identifier = null; | ||
attrName = classification.Span.GetText().Trim(); | ||
identifier = null; | ||
|
||
if(attrName == "cref") | ||
attrName = null; | ||
break; | ||
|
||
case "xml doc comment - attribute value": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
// System : Sandcastle Help File Builder Visual Studio Package | ||
// File : GoToDefinitionCommandTarget.cs | ||
// Author : Eric Woodruff ([email protected]) | ||
// Updated : 08/17/2019 | ||
// Updated : 09/02/2019 | ||
// Note : Copyright 2015-2019, Eric Woodruff, All rights reserved | ||
// Compiler: Microsoft Visual C# | ||
// | ||
|
@@ -287,50 +287,16 @@ private bool TryGoToDefinition() | |
} | ||
break; | ||
|
||
case "xml doc tag": | ||
// Track the last seen element or attribute. The classifier in VS2013 and earlier does | ||
// not break up the XML comments into elements and attributes so we may get a mix of text | ||
// in the "tag". | ||
attrName = classification.Span.GetText(); | ||
|
||
// As above, for conceptualLink, the next XML doc attribute will be the target | ||
if(attrName.StartsWith("<conceptualLink", StringComparison.Ordinal)) | ||
attrName = "conceptualLink"; | ||
|
||
// For token, the next XML doc comment will contain the token name | ||
if(attrName == "<token>") | ||
attrName = "token"; | ||
break; | ||
|
||
case "xml doc attribute": | ||
if(attrName == "conceptualLink" && classification.Span.Contains(cursorPos) && | ||
classification.Span.Length > 2) | ||
{ | ||
// Drop the quotes from the span | ||
var span = new SnapshotSpan(classification.Span.Snapshot, classification.Span.Start + 1, | ||
classification.Span.Length - 2); | ||
|
||
definitionType = "conceptualLink"; | ||
return span; | ||
} | ||
break; | ||
|
||
case "xml doc comment": | ||
if(attrName == "token" && classification.Span.Contains(cursorPos) && | ||
classification.Span.Length > 1) | ||
{ | ||
definitionType = "token"; | ||
return classification.Span; | ||
} | ||
break; | ||
|
||
// VS2015 is more specific in its classifications | ||
case "xml doc comment - name": | ||
elementName = classification.Span.GetText().Trim(); | ||
break; | ||
|
||
case "xml doc comment - attribute name": | ||
attrName = identifier = null; | ||
attrName = classification.Span.GetText().Trim(); | ||
identifier = null; | ||
|
||
if(attrName == "cref") | ||
attrName = null; | ||
break; | ||
|
||
case "xml doc comment - attribute value": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
// System : Sandcastle Help File Builder Visual Studio Package | ||
// File : XmlCommentsLinkQuickInfoSource.cs | ||
// Author : Eric Woodruff ([email protected]) | ||
// Updated : 06/19/2019 | ||
// Updated : 09/02/2019 | ||
// Note : Copyright 2014-2019, Eric Woodruff, All rights reserved | ||
// Compiler: Microsoft Visual C# | ||
// | ||
|
@@ -107,74 +107,25 @@ public void AugmentQuickInfoSession(IQuickInfoSession session, IList<object> qui | |
|
||
switch(name) | ||
{ | ||
case "xml doc tag": | ||
// Track the last seen element or attribute. The classifier in VS2013 and earlier does | ||
// not break up the XML comments into elements and attributes so we may get a mix of text | ||
// in the "tag". | ||
attrName = tagSpan.GetText(); | ||
|
||
// As above, for conceptualLink, the next XML doc attribute will be the target | ||
if(attrName.StartsWith("<conceptualLink", StringComparison.Ordinal)) | ||
attrName = "conceptualLink"; | ||
|
||
// For token, the next XML doc comment will contain the token name | ||
if(attrName == "<token>") | ||
attrName = "token"; | ||
break; | ||
|
||
case "xml doc attribute": | ||
if(attrName == "conceptualLink" && tagSpan.Contains(triggerPoint.Value) && tagSpan.Length > 2) | ||
{ | ||
// Drop the quotes from the span | ||
var span = new SnapshotSpan(tagSpan.Snapshot, tagSpan.Start + 1, tagSpan.Length - 2); | ||
|
||
#pragma warning disable VSTHRD010 | ||
content = this.CreateInfoText(attrName, span.GetText()); | ||
#pragma warning restore VSTHRD010 | ||
|
||
if(content != null) | ||
{ | ||
applicableToSpan = textBuffer.CurrentSnapshot.CreateTrackingSpan(span, | ||
SpanTrackingMode.EdgeExclusive); | ||
|
||
quickInfoContent.Add(content); | ||
} | ||
|
||
return; | ||
} | ||
break; | ||
|
||
case "xml doc comment": | ||
if(attrName == "token" && tagSpan.Contains(triggerPoint.Value) && tagSpan.Length > 1) | ||
{ | ||
content = this.CreateInfoText(attrName, tagSpan.GetText()); | ||
|
||
if(content != null) | ||
{ | ||
applicableToSpan = textBuffer.CurrentSnapshot.CreateTrackingSpan(tagSpan, | ||
SpanTrackingMode.EdgeExclusive); | ||
|
||
quickInfoContent.Add(content); | ||
} | ||
|
||
return; | ||
} | ||
break; | ||
|
||
// VS2015 is more specific in its classifications | ||
case "xml doc comment - name": | ||
elementName = tagSpan.GetText().Trim(); | ||
break; | ||
|
||
case "xml doc comment - attribute name": | ||
attrName = identifier = null; | ||
attrName = tagSpan.GetText().Trim(); | ||
identifier = null; | ||
|
||
if(attrName == "cref") | ||
attrName = null; | ||
break; | ||
|
||
case "xml doc comment - attribute value": | ||
if(elementName == "conceptualLink" && attrName == "target" && | ||
tagSpan.Contains(triggerPoint.Value) && tagSpan.Length > 1) | ||
{ | ||
#pragma warning disable VSTHRD010 | ||
content = this.CreateInfoText(elementName, tagSpan.GetText()); | ||
#pragma warning restore VSTHRD010 | ||
|
||
if(content != null) | ||
{ | ||
|
Oops, something went wrong.