Skip to content

Commit 182c20d

Browse files
committed
Minor fix
- Fixed additional reference links plug-in so that it works with the updated inherited docs build step. Fixes #1092.
1 parent 32c2f44 commit 182c20d

File tree

13 files changed

+48
-56
lines changed

13 files changed

+48
-56
lines changed

Deployment/InstallerConfiguration.xml

Lines changed: 1 addition & 1 deletion
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 tools version with which this installer is associated.-->
4-
<tools version="2024.12.15.0" />
4+
<tools version="2024.12.21.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. -->

Documentation/SandcastleBuilder/CommonTokens.tokens

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<ddue:linkUri>https://GitHub.com/EWSoftware/SHFB</ddue:linkUri>
77
<ddue:linkTarget>_blank</ddue:linkTarget>
88
</ddue:externalLink></item>
9-
<item id="SandcastleVersion">v2024.12.15.0</item>
9+
<item id="SandcastleVersion">v2024.12.21.0</item>
1010
<item id="VisualStudioMinVersion">Visual Studio 2017</item>
1111
</content>

Documentation/SandcastleBuilder/Content/VersionHistory/v2024.12.15.0.aml renamed to Documentation/SandcastleBuilder/Content/VersionHistory/v2024.12.21.0.aml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<topic id="430ecc56-ffcb-4470-aa5c-23b125965164" revisionNumber="1">
33
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
44
<introduction>
5-
<para>Release notes for version 2024.12.15.0.</para>
5+
<para>Release notes for version 2024.12.21.0.</para>
66
</introduction>
77

88
<section>

Documentation/SandcastleBuilder/SandcastleBuilder.content

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,14 +1364,14 @@
13641364
<HelpKeyword index="K" term="support, donate" />
13651365
</HelpKeywords>
13661366
</Topic>
1367-
<Topic id="078cc1c7-7995-431e-bf9c-8813becbe8df" visible="True" isSelected="true" title="Version History">
1367+
<Topic id="078cc1c7-7995-431e-bf9c-8813becbe8df" visible="True" isExpanded="true" title="Version History">
13681368
<HelpKeywords>
13691369
<HelpKeyword index="K" term="History" />
13701370
<HelpKeyword index="K" term="Version History" />
13711371
</HelpKeywords>
1372-
<Topic id="430ecc56-ffcb-4470-aa5c-23b125965164" visible="True" title="Version 2024.12.15.0">
1372+
<Topic id="430ecc56-ffcb-4470-aa5c-23b125965164" visible="True" isSelected="true" title="Version 2024.12.21.0">
13731373
<HelpKeywords>
1374-
<HelpKeyword index="K" term="versions, 2024.12.15.0" />
1374+
<HelpKeyword index="K" term="versions, 2024.12.21.0" />
13751375
</HelpKeywords>
13761376
</Topic>
13771377
<Topic id="5d844018-a4b8-47ec-af4e-c087b758b868" visible="True" title="Version 2024.9.12.0">

Documentation/SandcastleBuilder/SandcastleBuilder.shfbproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<FeedbackEMailAddress>Eric%40EWoodruff.us</FeedbackEMailAddress>
3636
<PresentationStyle>Default2022</PresentationStyle>
3737
<SyntaxFilters>Standard</SyntaxFilters>
38-
<HelpFileVersion>2024.12.15.0</HelpFileVersion>
38+
<HelpFileVersion>2024.12.21.0</HelpFileVersion>
3939
<ComponentConfigurations>
4040
</ComponentConfigurations>
4141
<DocumentationSources>
@@ -406,7 +406,7 @@
406406
<None Include="Content\VersionHistory\v2022.8.14.0.aml" />
407407
<None Include="Content\VersionHistory\v2023.3.4.0.aml" />
408408
<None Include="Content\VersionHistory\v2023.7.8.0.aml" />
409-
<None Include="Content\VersionHistory\v2024.12.15.0.aml" />
409+
<None Include="Content\VersionHistory\v2024.12.21.0.aml" />
410410
<None Include="Content\VersionHistory\v2024.2.18.0.aml" />
411411
<None Include="Content\VersionHistory\v2024.9.12.aml" />
412412
<None Include="Content\VisualStudio\GoToDefinition.aml" />

NuGet/SHFB.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata>
44
<id>EWSoftware.SHFB</id>
5-
<version>2024.12.15.0</version>
5+
<version>2024.12.21.0</version>
66
<title>Sandcastle Help File Builder</title>
77
<authors>Eric Woodruff</authors>
88
<owners>Eric Woodruff</owners>

SHFB/Source/SandcastleBuilderPlugIns/AdditionalReferenceLinksPlugIn.cs

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// System : Sandcastle Help File Builder Plug-Ins
33
// File : AdditionalReferenceLinksPlugIn.cs
44
// Author : Eric Woodruff (Eric@EWoodruff.us)
5-
// Updated : 02/25/2022
6-
// Note : Copyright 2008-2022, Eric Woodruff, All rights reserved
5+
// Updated : 12/20/2024
6+
// Note : Copyright 2008-2024, Eric Woodruff, All rights reserved
77
//
88
// This file contains a plug-in designed to add additional reference link targets to the Reflection Index Data
99
// and Resolve Reference Links build components so that links can be created to other third party help in a
@@ -166,7 +166,14 @@ public void Execute(ExecutionContext context)
166166

167167
if(context.BuildStep == BuildStep.GenerateInheritedDocumentation)
168168
{
169-
this.MergeInheritedDocConfig();
169+
builder.ReportProgress("Adding references to generate inherited documentation tool...");
170+
171+
foreach(ReferenceLinkSettings vs in otherLinks)
172+
{
173+
if(!String.IsNullOrEmpty(vs.ReflectionFilename))
174+
builder.GenerateInheritedDocsTool.ReflectionFiles.AddReflectionFile(vs.ReflectionFilename);
175+
}
176+
170177
return;
171178
}
172179

@@ -181,9 +188,13 @@ public void Execute(ExecutionContext context)
181188
f => Path.GetFileNameWithoutExtension(f)));
182189

183190
foreach(ReferenceLinkSettings vs in otherLinks)
191+
{
184192
if(!String.IsNullOrEmpty(vs.ReflectionFilename))
193+
{
185194
foreach(var n in BuildProcess.GetReferencedNamespaces(vs.ReflectionFilename, validNamespaces))
186195
rn.Add(n);
196+
}
197+
}
187198

188199
return;
189200
}
@@ -193,25 +204,6 @@ public void Execute(ExecutionContext context)
193204
this.MergeReflectionInfo();
194205
}
195206

196-
/// <summary>
197-
/// This is used to merge the reflection file names into the inherited documentation tool's configuration
198-
/// file.
199-
/// </summary>
200-
private void MergeInheritedDocConfig()
201-
{
202-
string configFilename = Path.Combine(builder.WorkingFolder, "GenerateInheritedDocs.config");
203-
204-
builder.ReportProgress("Adding references to {0}...", configFilename);
205-
206-
var configFile = XDocument.Load(configFilename);
207-
208-
foreach(ReferenceLinkSettings vs in otherLinks)
209-
if(!String.IsNullOrEmpty(vs.ReflectionFilename))
210-
configFile.Root.Add(new XElement("reflectionInfo", new XAttribute("file", vs.ReflectionFilename)));
211-
212-
configFile.Save(configFilename);
213-
}
214-
215207
/// <summary>
216208
/// This is used to merge the reflection file info into the named configuration file.
217209
/// </summary>
@@ -228,24 +220,16 @@ private void MergeReflectionInfo()
228220
// type but we only need the first one. This only appears in the reference build's configuration
229221
// file.
230222
var component = configFile.XPathSelectElement("//component[@id='Copy From Index Component']/" +
231-
"index[@name='reflection']");
232-
233-
// If not found, try for the cached version
234-
if(component == null)
235-
{
236-
component = configFile.XPathSelectElement("//component[starts-with(@id, " +
237-
"'Reflection Index Data')]/index[@name='reflection']");
238-
}
239-
240-
if(component == null)
241-
{
223+
"index[@name='reflection']") ??
224+
configFile.XPathSelectElement("//component[starts-with(@id, " +
225+
"'Reflection Index Data')]/index[@name='reflection']") ??
242226
throw new BuilderException("ARL0004", "Unable to locate Reflection Index Data component in " +
243227
builder.BuildAssemblerConfigurationFile);
244-
}
245228

246229
var lastChild = component.Descendants().Last();
247230

248231
foreach(ReferenceLinkSettings vs in otherLinks)
232+
{
249233
if(!String.IsNullOrEmpty(vs.ReflectionFilename))
250234
{
251235
target = new XElement("data",
@@ -255,6 +239,7 @@ private void MergeReflectionInfo()
255239
// Keep the current project's stuff listed last so that it takes precedence
256240
lastChild.AddBeforeSelf(target);
257241
}
242+
}
258243

259244
// Add them to the Resolve Reference Links component
260245
var matchingComponents = configFile.XPathSelectElements("//component[starts-with(@id, 'Resolve Reference Links')]").ToList();

SHFB/Source/SandcastleBuilderUtils/InheritedDocumentation/GenerateInheritedDocs.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// System : Sandcastle Help File Builder
33
// File : GenerateInheritedDocs.cs
44
// Author : Eric Woodruff (Eric@EWoodruff.us)
5-
// Updated : 09/13/2024
5+
// Updated : 12/20/2024
66
// Note : Copyright 2008-2024, Eric Woodruff, All rights reserved
77
//
88
// This file contains the build task that scans XML comments files for <inheritdoc /> tags and produces a new
@@ -74,6 +74,11 @@ public class GenerateInheritedDocs
7474
/// This read-only property returns the comments cache
7575
/// </summary>
7676
public IndexedCommentsCache CommentsCache => commentsCache;
77+
78+
/// <summary>
79+
/// This read-only property returns the reflection file information
80+
/// </summary>
81+
public ReflectionFiles ReflectionFiles => reflectionFiles;
7782

7883
#endregion
7984

@@ -200,14 +205,15 @@ public bool Execute()
200205
private void ScanCommentsFiles()
201206
{
202207
XPathNavigator apiId, apiField, fieldComments, attachedComments;
203-
XmlNode node;
208+
XmlDocumentFragment node;
204209
Dictionary<string, XPathNavigator> members = new Dictionary<string, XPathNavigator>();
205210
string name;
206211

207212
// Get a list of all unique members containing an <inheritdoc /> tag. This will include entries with
208213
// occurrences at the root level as well as those nested within other tags. Root level stuff will
209214
// get handled first followed by any nested tags.
210215
foreach(XPathNavigator file in commentsFiles)
216+
{
211217
foreach(XPathNavigator tag in file.Select("//inheritdoc"))
212218
{
213219
while(tag.Name != "member")
@@ -222,6 +228,7 @@ private void ScanCommentsFiles()
222228
if(apiId != null && !members.ContainsKey(name))
223229
members.Add(name, tag);
224230
}
231+
}
225232

226233
// For each one, create a new XML node that can be edited
227234
foreach(XPathNavigator nav in members.Values)
@@ -608,7 +615,7 @@ private void InheritNestedDocumentation(XmlNode member)
608615
{
609616
StringBuilder sb = new StringBuilder(256);
610617
XPathNavigator baseMember;
611-
XmlNode copyMember, newNode;
618+
XmlNode copyMember;
612619
XmlAttribute cref, filter, autoFilter;
613620
string name;
614621

@@ -686,7 +693,7 @@ private void InheritNestedDocumentation(XmlNode member)
686693
{
687694
foreach(XPathNavigator element in baseMember.Select(sb.ToString()))
688695
{
689-
newNode = inheritedDocs.CreateDocumentFragment();
696+
var newNode = inheritedDocs.CreateDocumentFragment();
690697

691698
// If there's no filter, we don't want the tag
692699
if(filter != null)

SHFB/Source/SandcastleBuilderUtils/Properties/AssemblyInfoShared.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// System : Sandcastle Help File Builder
33
// File : AssemblyInfoShared.cs
44
// Author : Eric Woodruff (Eric@EWoodruff.us)
5-
// Updated : 12/15/2024
5+
// Updated : 12/21/2024
66
// Note : Copyright 2006-2024, Eric Woodruff, All rights reserved
77
//
88
// Sandcastle Help File Builder common assembly attributes.
@@ -90,13 +90,13 @@ internal static partial class AssemblyInfo
9090
//
9191
// This is used to set the assembly file version. This will change with each new release. MSIs only
9292
// support a Major value between 0 and 255 so we drop the century from the year on this one.
93-
public const string FileVersion = "24.12.15.0";
93+
public const string FileVersion = "24.12.21.0";
9494

9595
// Common product version
9696
//
9797
// This may contain additional text to indicate Alpha or Beta states. The version number will always match
9898
// the file version above but includes the century on the year.
99-
public const string ProductVersion = "2024.12.15.0";
99+
public const string ProductVersion = "2024.12.21.0";
100100

101101
// Assembly copyright information
102102
public const string Copyright = "Copyright \xA9 2006-2024, Eric Woodruff, All Rights Reserved";

SHFB/Source/SandcastleCore/Properties/AssemblyInfoShared.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//===============================================================================================================
22
// System : Sandcastle Tools
33
// File : AssemblyInfoShared.cs
4-
// Updated : 12/15/2024
4+
// Updated : 12/21/2024
55
// Note : Copyright 2006-2024, Microsoft Corporation, All rights reserved
66
//
77
// Sandcastle tools common assembly attributes.
@@ -73,13 +73,13 @@ internal static partial class AssemblyInfo
7373
//
7474
// This is used to set the assembly file version. This will change with each new release. MSIs only
7575
// support a Major value between 0 and 255 so we drop the century from the year on this one.
76-
public const string FileVersion = "24.12.15.0";
76+
public const string FileVersion = "24.12.21.0";
7777

7878
// Common product version
7979
//
8080
// This may contain additional text to indicate Alpha or Beta states. The version number will always match
8181
// the file version above but includes the century on the year.
82-
public const string ProductVersion = "2024.12.15.0";
82+
public const string ProductVersion = "2024.12.21.0";
8383

8484
// Assembly copyright information
8585
public const string Copyright = "Copyright \xA9 2006-2024, Microsoft Corporation, All Rights Reserved.\r\n" +

0 commit comments

Comments
 (0)