Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
- Fixed additional reference links plug-in so that it works with the updated inherited docs build step.  Fixes #1092.
  • Loading branch information
EWSoftware committed Dec 21, 2024
1 parent 32c2f44 commit 182c20d
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Deployment/InstallerConfiguration.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!-- This indicates the tools version with which this installer is associated.-->
<tools version="2024.12.15.0" />
<tools version="2024.12.21.0" />

<!-- Define the installer pages. Third-party build tool and component providers can add new pages that
they have created to install their own products as well. -->
Expand Down
2 changes: 1 addition & 1 deletion Documentation/SandcastleBuilder/CommonTokens.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<ddue:linkUri>https://GitHub.com/EWSoftware/SHFB</ddue:linkUri>
<ddue:linkTarget>_blank</ddue:linkTarget>
</ddue:externalLink></item>
<item id="SandcastleVersion">v2024.12.15.0</item>
<item id="SandcastleVersion">v2024.12.21.0</item>
<item id="VisualStudioMinVersion">Visual Studio 2017</item>
</content>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<topic id="430ecc56-ffcb-4470-aa5c-23b125965164" 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 2024.12.15.0.</para>
<para>Release notes for version 2024.12.21.0.</para>
</introduction>

<section>
Expand Down
6 changes: 3 additions & 3 deletions Documentation/SandcastleBuilder/SandcastleBuilder.content
Original file line number Diff line number Diff line change
Expand Up @@ -1364,14 +1364,14 @@
<HelpKeyword index="K" term="support, donate" />
</HelpKeywords>
</Topic>
<Topic id="078cc1c7-7995-431e-bf9c-8813becbe8df" visible="True" isSelected="true" title="Version History">
<Topic id="078cc1c7-7995-431e-bf9c-8813becbe8df" visible="True" isExpanded="true" title="Version History">
<HelpKeywords>
<HelpKeyword index="K" term="History" />
<HelpKeyword index="K" term="Version History" />
</HelpKeywords>
<Topic id="430ecc56-ffcb-4470-aa5c-23b125965164" visible="True" title="Version 2024.12.15.0">
<Topic id="430ecc56-ffcb-4470-aa5c-23b125965164" visible="True" isSelected="true" title="Version 2024.12.21.0">
<HelpKeywords>
<HelpKeyword index="K" term="versions, 2024.12.15.0" />
<HelpKeyword index="K" term="versions, 2024.12.21.0" />
</HelpKeywords>
</Topic>
<Topic id="5d844018-a4b8-47ec-af4e-c087b758b868" visible="True" title="Version 2024.9.12.0">
Expand Down
4 changes: 2 additions & 2 deletions Documentation/SandcastleBuilder/SandcastleBuilder.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<FeedbackEMailAddress>Eric%40EWoodruff.us</FeedbackEMailAddress>
<PresentationStyle>Default2022</PresentationStyle>
<SyntaxFilters>Standard</SyntaxFilters>
<HelpFileVersion>2024.12.15.0</HelpFileVersion>
<HelpFileVersion>2024.12.21.0</HelpFileVersion>
<ComponentConfigurations>
</ComponentConfigurations>
<DocumentationSources>
Expand Down Expand Up @@ -406,7 +406,7 @@
<None Include="Content\VersionHistory\v2022.8.14.0.aml" />
<None Include="Content\VersionHistory\v2023.3.4.0.aml" />
<None Include="Content\VersionHistory\v2023.7.8.0.aml" />
<None Include="Content\VersionHistory\v2024.12.15.0.aml" />
<None Include="Content\VersionHistory\v2024.12.21.0.aml" />
<None Include="Content\VersionHistory\v2024.2.18.0.aml" />
<None Include="Content\VersionHistory\v2024.9.12.aml" />
<None Include="Content\VisualStudio\GoToDefinition.aml" />
Expand Down
2 changes: 1 addition & 1 deletion NuGet/SHFB.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>EWSoftware.SHFB</id>
<version>2024.12.15.0</version>
<version>2024.12.21.0</version>
<title>Sandcastle Help File Builder</title>
<authors>Eric Woodruff</authors>
<owners>Eric Woodruff</owners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// System : Sandcastle Help File Builder Plug-Ins
// File : AdditionalReferenceLinksPlugIn.cs
// Author : Eric Woodruff (Eric@EWoodruff.us)
// Updated : 02/25/2022
// Note : Copyright 2008-2022, Eric Woodruff, All rights reserved
// Updated : 12/20/2024
// Note : Copyright 2008-2024, Eric Woodruff, All rights reserved
//
// This file contains a plug-in designed to add additional reference link targets to the Reflection Index Data
// and Resolve Reference Links build components so that links can be created to other third party help in a
Expand Down Expand Up @@ -166,7 +166,14 @@ public void Execute(ExecutionContext context)

if(context.BuildStep == BuildStep.GenerateInheritedDocumentation)
{
this.MergeInheritedDocConfig();
builder.ReportProgress("Adding references to generate inherited documentation tool...");

foreach(ReferenceLinkSettings vs in otherLinks)
{
if(!String.IsNullOrEmpty(vs.ReflectionFilename))
builder.GenerateInheritedDocsTool.ReflectionFiles.AddReflectionFile(vs.ReflectionFilename);
}

return;
}

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

foreach(ReferenceLinkSettings vs in otherLinks)
{
if(!String.IsNullOrEmpty(vs.ReflectionFilename))
{
foreach(var n in BuildProcess.GetReferencedNamespaces(vs.ReflectionFilename, validNamespaces))
rn.Add(n);
}
}

return;
}
Expand All @@ -193,25 +204,6 @@ public void Execute(ExecutionContext context)
this.MergeReflectionInfo();
}

/// <summary>
/// This is used to merge the reflection file names into the inherited documentation tool's configuration
/// file.
/// </summary>
private void MergeInheritedDocConfig()
{
string configFilename = Path.Combine(builder.WorkingFolder, "GenerateInheritedDocs.config");

builder.ReportProgress("Adding references to {0}...", configFilename);

var configFile = XDocument.Load(configFilename);

foreach(ReferenceLinkSettings vs in otherLinks)
if(!String.IsNullOrEmpty(vs.ReflectionFilename))
configFile.Root.Add(new XElement("reflectionInfo", new XAttribute("file", vs.ReflectionFilename)));

configFile.Save(configFilename);
}

/// <summary>
/// This is used to merge the reflection file info into the named configuration file.
/// </summary>
Expand All @@ -228,24 +220,16 @@ private void MergeReflectionInfo()
// type but we only need the first one. This only appears in the reference build's configuration
// file.
var component = configFile.XPathSelectElement("//component[@id='Copy From Index Component']/" +
"index[@name='reflection']");

// If not found, try for the cached version
if(component == null)
{
component = configFile.XPathSelectElement("//component[starts-with(@id, " +
"'Reflection Index Data')]/index[@name='reflection']");
}

if(component == null)
{
"index[@name='reflection']") ??
configFile.XPathSelectElement("//component[starts-with(@id, " +
"'Reflection Index Data')]/index[@name='reflection']") ??
throw new BuilderException("ARL0004", "Unable to locate Reflection Index Data component in " +
builder.BuildAssemblerConfigurationFile);
}

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

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

// Add them to the Resolve Reference Links component
var matchingComponents = configFile.XPathSelectElements("//component[starts-with(@id, 'Resolve Reference Links')]").ToList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// System : Sandcastle Help File Builder
// File : GenerateInheritedDocs.cs
// Author : Eric Woodruff (Eric@EWoodruff.us)
// Updated : 09/13/2024
// Updated : 12/20/2024
// Note : Copyright 2008-2024, Eric Woodruff, All rights reserved
//
// This file contains the build task that scans XML comments files for <inheritdoc /> tags and produces a new
Expand Down Expand Up @@ -74,6 +74,11 @@ public class GenerateInheritedDocs
/// This read-only property returns the comments cache
/// </summary>
public IndexedCommentsCache CommentsCache => commentsCache;

/// <summary>
/// This read-only property returns the reflection file information
/// </summary>
public ReflectionFiles ReflectionFiles => reflectionFiles;

#endregion

Expand Down Expand Up @@ -200,14 +205,15 @@ public bool Execute()
private void ScanCommentsFiles()
{
XPathNavigator apiId, apiField, fieldComments, attachedComments;
XmlNode node;
XmlDocumentFragment node;
Dictionary<string, XPathNavigator> members = new Dictionary<string, XPathNavigator>();
string name;

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

// For each one, create a new XML node that can be edited
foreach(XPathNavigator nav in members.Values)
Expand Down Expand Up @@ -608,7 +615,7 @@ private void InheritNestedDocumentation(XmlNode member)
{
StringBuilder sb = new StringBuilder(256);
XPathNavigator baseMember;
XmlNode copyMember, newNode;
XmlNode copyMember;
XmlAttribute cref, filter, autoFilter;
string name;

Expand Down Expand Up @@ -686,7 +693,7 @@ private void InheritNestedDocumentation(XmlNode member)
{
foreach(XPathNavigator element in baseMember.Select(sb.ToString()))
{
newNode = inheritedDocs.CreateDocumentFragment();
var newNode = inheritedDocs.CreateDocumentFragment();

// If there's no filter, we don't want the tag
if(filter != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// System : Sandcastle Help File Builder
// File : AssemblyInfoShared.cs
// Author : Eric Woodruff (Eric@EWoodruff.us)
// Updated : 12/15/2024
// Updated : 12/21/2024
// Note : Copyright 2006-2024, Eric Woodruff, All rights reserved
//
// Sandcastle Help File Builder common assembly attributes.
Expand Down Expand Up @@ -90,13 +90,13 @@ internal static partial class AssemblyInfo
//
// This is used to set the assembly file version. This will change with each new release. MSIs only
// support a Major value between 0 and 255 so we drop the century from the year on this one.
public const string FileVersion = "24.12.15.0";
public const string FileVersion = "24.12.21.0";

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

// Assembly copyright information
public const string Copyright = "Copyright \xA9 2006-2024, Eric Woodruff, All Rights Reserved";
Expand Down
6 changes: 3 additions & 3 deletions SHFB/Source/SandcastleCore/Properties/AssemblyInfoShared.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//===============================================================================================================
// System : Sandcastle Tools
// File : AssemblyInfoShared.cs
// Updated : 12/15/2024
// Updated : 12/21/2024
// Note : Copyright 2006-2024, Microsoft Corporation, All rights reserved
//
// Sandcastle tools common assembly attributes.
Expand Down Expand Up @@ -73,13 +73,13 @@ internal static partial class AssemblyInfo
//
// This is used to set the assembly file version. This will change with each new release. MSIs only
// support a Major value between 0 and 255 so we drop the century from the year on this one.
public const string FileVersion = "24.12.15.0";
public const string FileVersion = "24.12.21.0";

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

// Assembly copyright information
public const string Copyright = "Copyright \xA9 2006-2024, Microsoft Corporation, All Rights Reserved.\r\n" +
Expand Down
2 changes: 1 addition & 1 deletion SHFB/Source/SandcastleInstaller/InstallerConfiguration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<pathOffset location="..\..\..\..\..\Deployment" />

<!-- This indicates the tools version with which this installer is associated.-->
<tools version="2024.12.15.0" />
<tools version="2024.12.21.0" />

<!-- Define the installer pages. Third-party build tool and component providers can add new pages that
they have created to install their own products as well. -->
Expand Down
2 changes: 1 addition & 1 deletion SHFB/Source/VSIX_VS2017/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="c997d569-ee8e-4947-a46f-9a0717ce39a0" Version="2024.12.15.0" Language="en-US" Publisher="EWSoftware" />
<Identity Id="c997d569-ee8e-4947-a46f-9a0717ce39a0" Version="2024.12.21.0" Language="en-US" Publisher="EWSoftware" />
<DisplayName>SHFB (VS2017 and VS2019)</DisplayName>
<Description xml:space="preserve">Visual Studio integration for the Sandcastle Help File Builder.</Description>
<MoreInfo>https://ewsoftware.github.io/SHFB/html/bd1ddb51-1c4f-434f-bb1a-ce2135d3a909.htm</MoreInfo>
Expand Down
2 changes: 1 addition & 1 deletion SHFB/Source/VSIX_VS2022/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="SHFB.A8C96335-DAF7-4D30-89E2-B004400E4525" Version="2024.12.15.0" Language="en-US" Publisher="EWSoftware" />
<Identity Id="SHFB.A8C96335-DAF7-4D30-89E2-B004400E4525" Version="2024.12.21.0" Language="en-US" Publisher="EWSoftware" />
<DisplayName>SHFB (VS2022 and Later)</DisplayName>
<Description xml:space="preserve">Visual Studio integration for the Sandcastle Help File Builder.</Description>
<MoreInfo>https://ewsoftware.github.io/SHFB/html/bd1ddb51-1c4f-434f-bb1a-ce2135d3a909.htm</MoreInfo>
Expand Down

0 comments on commit 182c20d

Please sign in to comment.