Skip to content

Commit df5d44a

Browse files
committed
Minor fixes
- 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.
1 parent dfc6750 commit df5d44a

File tree

16 files changed

+87
-155
lines changed

16 files changed

+87
-155
lines changed

Deployment/InstallerConfiguration.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration>
33
<!-- This indicates the version of Sandcastle with which this installer is associated.-->
4-
<sandcastle version="v2019.8.24.0" />
4+
<sandcastle version="v2019.9.15.0" />
55

66
<!-- Define the installer pages. Third-party build tool and component providers can add new pages that
77
they have created to install their own products as well. -->
@@ -13,8 +13,8 @@
1313
<page type="Sandcastle.Installer.InstallerPages.WelcomePage" />
1414

1515
<page type="Sandcastle.Installer.InstallerPages.WhatsNewPage">
16-
<whatsNew url="https://EWSoftware.github.io/SHFB/html/3bb3e240-7c36-456b-bebd-972ff1508c15.htm"
17-
description="Sandcastle Help File Builder and Tools v2019.8.24.0 Release Notes" />
16+
<whatsNew url="https://EWSoftware.github.io/SHFB/html/06a9fd7f-31bb-4bb8-b685-04cc59fc36dd.htm"
17+
description="Sandcastle Help File Builder and Tools v2019.9.15.0 Release Notes" />
1818
</page>
1919

2020
<page type="Sandcastle.Installer.InstallerPages.RequiredFrameworkPage" />
@@ -24,7 +24,7 @@
2424
</page>
2525

2626
<page type="Sandcastle.Installer.InstallerPages.SandcastleHelpFileBuilderPage"
27-
frameworkVersion="4.5" shfbVersion="2019.8.24.0" installerName="SandcastleHelpFileBuilder.msi"/>
27+
frameworkVersion="4.5" shfbVersion="2019.9.15.0" installerName="SandcastleHelpFileBuilder.msi"/>
2828

2929
<page type="Sandcastle.Installer.InstallerPages.SHFBVisualStudioPackagePage"
3030
frameworkVersion="4.5" packageGuid="c997d569-ee8e-4947-a46f-9a0717ce39a0">

Documentation/SandcastleBuilder/CommonTokens.tokens

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<content xml:space="preserve" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
33
<item id="BuildDate">{@BuildDate:MMMM d, yyyy}</item>
4-
<item id="SandcastleVersion">v2019.8.24.0</item>
4+
<item id="SandcastleVersion">v2019.9.15.0</item>
55
<item id="SHFB"><ddue:externalLink xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5">
66
<ddue:linkText>Sandcastle Help File Builder</ddue:linkText>
77
<ddue:linkUri>https://GitHub.com/EWSoftware/SHFB</ddue:linkUri>

Documentation/SandcastleBuilder/Content/GettingStarted/Installation.aml

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ compilers, it contains instructions on where to get them and how to install them
2727
<para>When using the guided installation, you can skip the <ui>Requirements</ui> section below as it
2828
takes care of all of the required steps. See the <ui>Recommended Additions</ui> sections for additional tools
2929
not included in the guided installation that you may find useful.</para>
30+
31+
<para>The help file builder tools and the Visual Studio package can be installed manually by running the
32+
MSI and VSIX installers found in the <localUri>.\InstallResources</localUri> folder extracted from the guided
33+
installer download. If installing the tools manually, the optional components such as the XML schemas and
34+
snippets will not be installed. You will also need to ensure the requirements noted below are also present if
35+
needed.</para>
3036
</content>
3137
</section>
3238

Documentation/SandcastleBuilder/Content/VersionHistory/VersionHistory.aml

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ review the release notes from all releases after it to the latest to find change
1616
your project such as modifications to build component and plug-in configurations.</para>
1717

1818
<list class="bullet">
19+
<listItem>
20+
<para>
21+
<link xlink:href="06a9fd7f-31bb-4bb8-b685-04cc59fc36dd" />
22+
</para>
23+
</listItem>
1924
<listItem>
2025
<para>
2126
<link xlink:href="3bb3e240-7c36-456b-bebd-972ff1508c15" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<topic id="06a9fd7f-31bb-4bb8-b685-04cc59fc36dd" revisionNumber="1">
3+
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
4+
<introduction>
5+
<para>Release notes for version 2019.9.15.0.</para>
6+
</introduction>
7+
8+
<section>
9+
<title>Changes in This Release</title>
10+
<content>
11+
12+
<list class="bullet">
13+
<listItem>
14+
<para>Removed some invalid tags from the updated reference links in the Open XML and Markdown
15+
presentation styles.</para>
16+
</listItem>
17+
18+
<listItem>
19+
<para>Added back support for Go To Definition on <codeInline>conceptualLink</codeInline> elements in
20+
XML comments.</para>
21+
</listItem>
22+
</list>
23+
24+
</content>
25+
</section>
26+
27+
<relatedTopics>
28+
<link xlink:href="078cc1c7-7995-431e-bf9c-8813becbe8df" />
29+
</relatedTopics>
30+
31+
</developerConceptualDocument>
32+
</topic>

Documentation/SandcastleBuilder/SandcastleBuilder.content

+7-2
Original file line numberDiff line numberDiff line change
@@ -1383,12 +1383,17 @@
13831383
<HelpKeyword index="K" term="support, donate" />
13841384
</HelpKeywords>
13851385
</Topic>
1386-
<Topic id="078cc1c7-7995-431e-bf9c-8813becbe8df" visible="True" isExpanded="true" title="Version History">
1386+
<Topic id="078cc1c7-7995-431e-bf9c-8813becbe8df" visible="True" isSelected="true" title="Version History">
13871387
<HelpKeywords>
13881388
<HelpKeyword index="K" term="History" />
13891389
<HelpKeyword index="K" term="Version History" />
13901390
</HelpKeywords>
1391-
<Topic id="3bb3e240-7c36-456b-bebd-972ff1508c15" visible="True" isSelected="true" title="Version 2019.8.24.0">
1391+
<Topic id="06a9fd7f-31bb-4bb8-b685-04cc59fc36dd" visible="True" title="Version 2019.9.15.0">
1392+
<HelpKeywords>
1393+
<HelpKeyword index="K" term="versions, 2019.9.15.0" />
1394+
</HelpKeywords>
1395+
</Topic>
1396+
<Topic id="3bb3e240-7c36-456b-bebd-972ff1508c15" visible="True" title="Version 2019.8.24.0">
13921397
<HelpKeywords>
13931398
<HelpKeyword index="K" term="versions, 2019.8.24.0" />
13941399
</HelpKeywords>

Documentation/SandcastleBuilder/SandcastleBuilder.shfbproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<FeedbackEMailAddress>Eric%40EWoodruff.us</FeedbackEMailAddress>
3434
<PresentationStyle>VS2013</PresentationStyle>
3535
<SyntaxFilters>Standard</SyntaxFilters>
36-
<HelpFileVersion>2019.8.24.0</HelpFileVersion>
36+
<HelpFileVersion>2019.9.15.0</HelpFileVersion>
3737
<ComponentConfigurations>
3838
</ComponentConfigurations>
3939
<DocumentationSources>
@@ -401,6 +401,7 @@
401401
<None Include="Content\VersionHistory\v2018.7.8.0.aml" />
402402
<None Include="Content\VersionHistory\v2019.4.14.0.aml" />
403403
<None Include="Content\VersionHistory\v2019.8.24.0.aml" />
404+
<None Include="Content\VersionHistory\v2019.9.15.0.aml" />
404405
<None Include="Content\VisualStudio\GoToDefinition.aml" />
405406
<None Include="Content\VisualStudio\ItemFileTemplates.aml" />
406407
<None Include="Content\VisualStudio\FeatureComparison.aml" />

NuGet/SHFB.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
77
<metadata>
88
<id>EWSoftware.SHFB</id>
9-
<version>2019.8.24.0</version>
9+
<version>2019.9.15.0</version>
1010
<title>Sandcastle Help File Builder</title>
1111
<authors>Eric Woodruff</authors>
1212
<owners>Eric Woodruff</owners>

SHFB/Source/PresentationStyles/Markdown/Content/zh-CN/ReferenceContent.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
<!-- Variance boilerplate text -->
279279
<item id="text_covariant">This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. </item>
280280
<item id="text_contravariant">This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. </item>
281-
<item id="text_variance">For more information about covariance and contravariance, see <a href="https://docs.microsoft.com/dotnet/visual-basic/programming-guide/concepts/covariance-contravariance/index">Covariance and Contravariance (Visual Basic)</a> and <a href="https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/covariance-contravariance/index">Covariance and Contravariance (C#)</a>.</a>.</item>
281+
<item id="text_variance">For more information about covariance and contravariance, see <a href="https://docs.microsoft.com/dotnet/visual-basic/programming-guide/concepts/covariance-contravariance/index">Covariance and Contravariance (Visual Basic)</a> and <a href="https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/covariance-contravariance/index">Covariance and Contravariance (C#)</a>.</item>
282282

283283
<!-- Non CLS Compliant boilerplate text-->
284284
<item id="boilerplate_NotClsCompliant">This API is not CLS-compliant.</item>

SHFB/Source/PresentationStyles/OpenXml/Content/zh-CN/ReferenceContent.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
<!-- Variance boilerplate text -->
291291
<item id="text_covariant">This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. </item>
292292
<item id="text_contravariant">This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. </item>
293-
<item id="text_variance">For more information about covariance and contravariance, see <a href="https://docs.microsoft.com/dotnet/visual-basic/programming-guide/concepts/covariance-contravariance/index">Covariance and Contravariance (Visual Basic)</a> and <a href="https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/covariance-contravariance/index">Covariance and Contravariance (C#)</a>.</a>.</item>
293+
<item id="text_variance">For more information about covariance and contravariance, see <a href="https://docs.microsoft.com/dotnet/visual-basic/programming-guide/concepts/covariance-contravariance/index">Covariance and Contravariance (Visual Basic)</a> and <a href="https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/covariance-contravariance/index">Covariance and Contravariance (C#)</a>.</item>
294294

295295
<!-- Non CLS Compliant boilerplate text-->
296296
<item id="boilerplate_NotClsCompliant">This API is not CLS-compliant.</item>

SHFB/Source/SandcastleBuilderPackage/GoToDefinition/CSharpGoToDefinitionMouseProcessor.cs

+6-40
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// System : Sandcastle Help File Builder Visual Studio Package
33
// File : CSharpGoToDefinitionMouseProcessor.cs
44
// Author : Eric Woodruff ([email protected])
5-
// Updated : 06/19/2019
5+
// Updated : 09/02/2019
66
// Note : Copyright 2014-2019, Eric Woodruff, All rights reserved
77
// Compiler: Microsoft Visual C#
88
//
@@ -76,50 +76,16 @@ protected override bool ProcessSpans(SnapshotSpan mousePoint, IList<Classificati
7676
// Highlight the span if it matches what we are looking for and it contains the mouse span
7777
switch(name)
7878
{
79-
case "xml doc tag":
80-
// Track the last seen element or attribute. The classifier in VS2013 and earlier does
81-
// not break up the XML comments into elements and attributes so we may get a mix of text
82-
// in the "tag".
83-
attrName = classification.Span.GetText();
84-
85-
// As above, for conceptualLink, the next XML doc attribute will be the target
86-
if(attrName.StartsWith("<conceptualLink", StringComparison.Ordinal))
87-
attrName = "conceptualLink";
88-
89-
// For token, the next XML doc comment will contain the token name
90-
if(attrName == "<token>")
91-
attrName = "token";
92-
break;
93-
94-
case "xml doc attribute":
95-
if(attrName == "conceptualLink" && classification.Span.Contains(mousePoint) &&
96-
classification.Span.Length > 2)
97-
{
98-
// Drop the quotes from the span
99-
var span = new SnapshotSpan(classification.Span.Snapshot, classification.Span.Start + 1,
100-
classification.Span.Length - 2);
101-
102-
if(this.SetHighlightSpan(span, "link"))
103-
return true;
104-
}
105-
break;
106-
107-
case "xml doc comment":
108-
if(attrName == "token" && classification.Span.Contains(mousePoint) &&
109-
classification.Span.Length > 1)
110-
{
111-
if(this.SetHighlightSpan(classification.Span, "token"))
112-
return true;
113-
}
114-
break;
115-
116-
// VS2015 is more specific in its classifications
11779
case "xml doc comment - name":
11880
elementName = classification.Span.GetText().Trim();
11981
break;
12082

12183
case "xml doc comment - attribute name":
122-
attrName = identifier = null;
84+
attrName = classification.Span.GetText().Trim();
85+
identifier = null;
86+
87+
if(attrName == "cref")
88+
attrName = null;
12389
break;
12490

12591
case "xml doc comment - attribute value":

SHFB/Source/SandcastleBuilderPackage/GoToDefinition/GoToDefinitionCommandTarget.cs

+6-40
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// System : Sandcastle Help File Builder Visual Studio Package
33
// File : GoToDefinitionCommandTarget.cs
44
// Author : Eric Woodruff ([email protected])
5-
// Updated : 08/17/2019
5+
// Updated : 09/02/2019
66
// Note : Copyright 2015-2019, Eric Woodruff, All rights reserved
77
// Compiler: Microsoft Visual C#
88
//
@@ -287,50 +287,16 @@ private bool TryGoToDefinition()
287287
}
288288
break;
289289

290-
case "xml doc tag":
291-
// Track the last seen element or attribute. The classifier in VS2013 and earlier does
292-
// not break up the XML comments into elements and attributes so we may get a mix of text
293-
// in the "tag".
294-
attrName = classification.Span.GetText();
295-
296-
// As above, for conceptualLink, the next XML doc attribute will be the target
297-
if(attrName.StartsWith("<conceptualLink", StringComparison.Ordinal))
298-
attrName = "conceptualLink";
299-
300-
// For token, the next XML doc comment will contain the token name
301-
if(attrName == "<token>")
302-
attrName = "token";
303-
break;
304-
305-
case "xml doc attribute":
306-
if(attrName == "conceptualLink" && classification.Span.Contains(cursorPos) &&
307-
classification.Span.Length > 2)
308-
{
309-
// Drop the quotes from the span
310-
var span = new SnapshotSpan(classification.Span.Snapshot, classification.Span.Start + 1,
311-
classification.Span.Length - 2);
312-
313-
definitionType = "conceptualLink";
314-
return span;
315-
}
316-
break;
317-
318-
case "xml doc comment":
319-
if(attrName == "token" && classification.Span.Contains(cursorPos) &&
320-
classification.Span.Length > 1)
321-
{
322-
definitionType = "token";
323-
return classification.Span;
324-
}
325-
break;
326-
327-
// VS2015 is more specific in its classifications
328290
case "xml doc comment - name":
329291
elementName = classification.Span.GetText().Trim();
330292
break;
331293

332294
case "xml doc comment - attribute name":
333-
attrName = identifier = null;
295+
attrName = classification.Span.GetText().Trim();
296+
identifier = null;
297+
298+
if(attrName == "cref")
299+
attrName = null;
334300
break;
335301

336302
case "xml doc comment - attribute value":

SHFB/Source/SandcastleBuilderPackage/GoToDefinition/XmlCommentsLinkQuickInfoSource.cs

+8-57
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// System : Sandcastle Help File Builder Visual Studio Package
33
// File : XmlCommentsLinkQuickInfoSource.cs
44
// Author : Eric Woodruff ([email protected])
5-
// Updated : 06/19/2019
5+
// Updated : 09/02/2019
66
// Note : Copyright 2014-2019, Eric Woodruff, All rights reserved
77
// Compiler: Microsoft Visual C#
88
//
@@ -107,74 +107,25 @@ public void AugmentQuickInfoSession(IQuickInfoSession session, IList<object> qui
107107

108108
switch(name)
109109
{
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
165110
case "xml doc comment - name":
166111
elementName = tagSpan.GetText().Trim();
167112
break;
168113

169114
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;
171120
break;
172121

173122
case "xml doc comment - attribute value":
174123
if(elementName == "conceptualLink" && attrName == "target" &&
175124
tagSpan.Contains(triggerPoint.Value) && tagSpan.Length > 1)
176125
{
126+
#pragma warning disable VSTHRD010
177127
content = this.CreateInfoText(elementName, tagSpan.GetText());
128+
#pragma warning restore VSTHRD010
178129

179130
if(content != null)
180131
{

0 commit comments

Comments
 (0)