Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
- 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
EWSoftware committed Sep 15, 2019
1 parent dfc6750 commit df5d44a
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 155 deletions.
8 changes: 4 additions & 4 deletions 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 version of Sandcastle with which this installer is associated.-->
<sandcastle version="v2019.8.24.0" />
<sandcastle version="v2019.9.15.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 All @@ -13,8 +13,8 @@
<page type="Sandcastle.Installer.InstallerPages.WelcomePage" />

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

<page type="Sandcastle.Installer.InstallerPages.RequiredFrameworkPage" />
Expand All @@ -24,7 +24,7 @@
</page>

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

<page type="Sandcastle.Installer.InstallerPages.SHFBVisualStudioPackagePage"
frameworkVersion="4.5" packageGuid="c997d569-ee8e-4947-a46f-9a0717ce39a0">
Expand Down
2 changes: 1 addition & 1 deletion Documentation/SandcastleBuilder/CommonTokens.tokens
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<content xml:space="preserve" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<item id="BuildDate">{@BuildDate:MMMM d, yyyy}</item>
<item id="SandcastleVersion">v2019.8.24.0</item>
<item id="SandcastleVersion">v2019.9.15.0</item>
<item id="SHFB"><ddue:externalLink xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5">
<ddue:linkText>Sandcastle Help File Builder</ddue:linkText>
<ddue:linkUri>https://GitHub.com/EWSoftware/SHFB</ddue:linkUri>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ compilers, it contains instructions on where to get them and how to install them
<para>When using the guided installation, you can skip the <ui>Requirements</ui> section below as it
takes care of all of the required steps. See the <ui>Recommended Additions</ui> sections for additional tools
not included in the guided installation that you may find useful.</para>

<para>The help file builder tools and the Visual Studio package can be installed manually by running the
MSI and VSIX installers found in the <localUri>.\InstallResources</localUri> folder extracted from the guided
installer download. If installing the tools manually, the optional components such as the XML schemas and
snippets will not be installed. You will also need to ensure the requirements noted below are also present if
needed.</para>
</content>
</section>

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

<list class="bullet">
<listItem>
<para>
<link xlink:href="06a9fd7f-31bb-4bb8-b685-04cc59fc36dd" />
</para>
</listItem>
<listItem>
<para>
<link xlink:href="3bb3e240-7c36-456b-bebd-972ff1508c15" />
Expand Down
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>
9 changes: 7 additions & 2 deletions Documentation/SandcastleBuilder/SandcastleBuilder.content
Original file line number Diff line number Diff line change
Expand Up @@ -1383,12 +1383,17 @@
<HelpKeyword index="K" term="support, donate" />
</HelpKeywords>
</Topic>
<Topic id="078cc1c7-7995-431e-bf9c-8813becbe8df" visible="True" isExpanded="true" title="Version History">
<Topic id="078cc1c7-7995-431e-bf9c-8813becbe8df" visible="True" isSelected="true" title="Version History">
<HelpKeywords>
<HelpKeyword index="K" term="History" />
<HelpKeyword index="K" term="Version History" />
</HelpKeywords>
<Topic id="3bb3e240-7c36-456b-bebd-972ff1508c15" visible="True" isSelected="true" title="Version 2019.8.24.0">
<Topic id="06a9fd7f-31bb-4bb8-b685-04cc59fc36dd" visible="True" title="Version 2019.9.15.0">
<HelpKeywords>
<HelpKeyword index="K" term="versions, 2019.9.15.0" />
</HelpKeywords>
</Topic>
<Topic id="3bb3e240-7c36-456b-bebd-972ff1508c15" visible="True" title="Version 2019.8.24.0">
<HelpKeywords>
<HelpKeyword index="K" term="versions, 2019.8.24.0" />
</HelpKeywords>
Expand Down
3 changes: 2 additions & 1 deletion Documentation/SandcastleBuilder/SandcastleBuilder.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<FeedbackEMailAddress>Eric%40EWoodruff.us</FeedbackEMailAddress>
<PresentationStyle>VS2013</PresentationStyle>
<SyntaxFilters>Standard</SyntaxFilters>
<HelpFileVersion>2019.8.24.0</HelpFileVersion>
<HelpFileVersion>2019.9.15.0</HelpFileVersion>
<ComponentConfigurations>
</ComponentConfigurations>
<DocumentationSources>
Expand Down Expand Up @@ -401,6 +401,7 @@
<None Include="Content\VersionHistory\v2018.7.8.0.aml" />
<None Include="Content\VersionHistory\v2019.4.14.0.aml" />
<None Include="Content\VersionHistory\v2019.8.24.0.aml" />
<None Include="Content\VersionHistory\v2019.9.15.0.aml" />
<None Include="Content\VisualStudio\GoToDefinition.aml" />
<None Include="Content\VisualStudio\ItemFileTemplates.aml" />
<None Include="Content\VisualStudio\FeatureComparison.aml" />
Expand Down
2 changes: 1 addition & 1 deletion NuGet/SHFB.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>EWSoftware.SHFB</id>
<version>2019.8.24.0</version>
<version>2019.9.15.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 @@ -278,7 +278,7 @@
<!-- Variance boilerplate text -->
<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>
<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>
<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>
<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>

<!-- Non CLS Compliant boilerplate text-->
<item id="boilerplate_NotClsCompliant">This API is not CLS-compliant.</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
<!-- Variance boilerplate text -->
<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>
<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>
<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>
<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>

<!-- Non CLS Compliant boilerplate text-->
<item id="boilerplate_NotClsCompliant">This API is not CLS-compliant.</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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#
//
Expand Down Expand Up @@ -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":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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#
//
Expand Down Expand Up @@ -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":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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#
//
Expand Down Expand Up @@ -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)
{
Expand Down
Loading

0 comments on commit df5d44a

Please sign in to comment.