Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
- Added support for the todo note type and the title attribute on the note XML comments element.
- Updated the help project to use the new Default2022 style.
- Split the projects into separate solutions for VS2019 and VS2022.
  • Loading branch information
EWSoftware committed Jul 29, 2022
1 parent 63a5445 commit 42f2950
Show file tree
Hide file tree
Showing 20 changed files with 205 additions and 116 deletions.
20 changes: 12 additions & 8 deletions Docs/Content/Installation.aml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,37 @@
<content>
<list class="bullet">
<listItem>
<para>Download the latest release of the VSIX installer from the <externalLink>
<para>Download the latest release of the VSIX installer for your version of Visual Studio from the
<externalLink>
<linkText>Releases</linkText>
<linkUri>https://GitHub.com/EWSoftware/ExtendedDocCommentsProvider/releases</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink> page of this project site. The package can be installed in Visual Studio 2019 or later.</para>
</externalLink> page of the project site. The package can be installed in Visual Studio 2019 or Visual Studio
2022 or later.</para>
</listItem>

<listItem>
<para>Close all open instances of Visual Studio before installing the package.</para>
</listItem>

<listItem>
<para>Run the downloaded package and follow the prompts to install it. It can be installed in any
edition of Visual Studio except Express editions. Express editions are not supported as they do not allow
installation of third-party extensions. Consider switching to the newer Community Edition which does support
them.</para>
<para>Run the downloaded package and follow the prompts to install it.</para>
</listItem>

</list>

<para>This package can also be installed from within Visual Studio from the Visual Studio Marketplace
(<externalLink>
<linkText>Visual Studio 2019 or later</linkText>
<linkText>Visual Studio 2019</linkText>
<linkUri>https://marketplace.visualstudio.com/items?itemName=EWoodruff.ExtendedDocCommentsProvider</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink> or
<externalLink>
<linkText>Visual Studio 2022 or later</linkText>
<linkUri>https://marketplace.visualstudio.com/items?itemName=EWoodruff.ExtendedDocCommentsProvider2022</linkUri>
<linkTarget>_blank</linkTarget>
</externalLink>) using the <ui>Tools | Extension and Updates</ui> option. Select the online marketplace and
search for "completion provider". Include the quote marks for an exact match and find the one created by
search for "doc comments provider". Include the quote marks for an exact match and find the one created by
<legacyItalic>EWSoftware</legacyItalic>. Once found, you can click the <ui>Download</ui> button to download and
install it.</para>

Expand Down
16 changes: 4 additions & 12 deletions Docs/Content/SystemRequirements.aml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>The master branch is for Visual Studio 2019 and later and is the default branch for all current and
future development. In order to build the projects you will need the following tools:</para>

<list class="bullet">
<listItem>
<para>For the master branch, you will need Visual Studio 2019 or later.</para>
</listItem>

</list>
future development. In order to build the projects you will need Visual Studio 2019 or later.</para>
</introduction>

<section>
Expand All @@ -34,10 +27,9 @@ and all related files) generated by building the projects.</para>
<section>
<title>Building and Debugging the Projects</title>
<content>
<para>To build the projects, open the solution file (<localUri>*.sln</localUri>) found in the
<localUri>Source\</localUri> folder and build it. You can also run the <localUri>MasterBuild.bat</localUri>
script from a command prompt to build the projects. The projects should be built at least once in Visual
Studio so that all of the necessary NuGet packages are restored and available for the command line build.</para>
<para>To build the projects, open the solution file (<localUri>*.sln</localUri>) for your version of
Visual Studio (currently 2019 or 2022) found in the <localUri>Source\</localUri> folder and build it. You can
also run the <localUri>MasterBuild.bat</localUri> script from a command prompt to build the projects.</para>

<para>In order to debug the projects:</para>

Expand Down
6 changes: 6 additions & 0 deletions Docs/Content/VersionHistory/VersionHistory.aml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ over the life of the project. Select a version below to see a description of it
<section>
<content>
<list class="bullet">
<listItem>
<para>
<link xlink:href="23ea721a-0a75-48c7-8457-7614bf3c4926" />
</para>
</listItem>

<listItem>
<para>
<link xlink:href="16fd137b-699a-4260-906f-59d94818ff7a" />
Expand Down
26 changes: 26 additions & 0 deletions Docs/Content/VersionHistory/v2022.7.29.0.aml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="23ea721a-0a75-48c7-8457-7614bf3c4926" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>Changes made in this release:</para>
</introduction>

<section>
<content>

<list class="bullet">
<listItem>
<para>Added support for the <codeInline>title</codeInline> attribute and the <codeInline>todo</codeInline>
note type for the <codeInline>note</codeInline> XML comments element.</para>
</listItem>
</list>

</content>
</section>

<relatedTopics>
<link xlink:href="caa20db4-521f-4c4c-8399-aea8a81ae6a7" />
</relatedTopics>

</developerConceptualDocument>
</topic>
15 changes: 13 additions & 2 deletions Docs/Content/Welcome.aml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<para>Welcome to the <legacyBold>Extended XML Documentation Comments Completion Provider</legacyBold> project.</para>
</introduction>

<!-- Ignore Spelling: cpp, fs, javascript, vbnet, html, xml, xsl, xaml, sql, py, pshell href threadsafety seealso -->
<!-- Ignore Spelling: cpp, fs, javascript, vbnet, html, xml, xsl, xaml, sql, py, pshell href threadsafety seealso todo -->

<section>
<content>
Expand Down Expand Up @@ -200,7 +200,18 @@ Builder and other documentation tools. The following elements, attributes, and
<para>type</para>
</entry>
<entry>
<para>note, tip, implement, caller, inherit, caution, warning, important, security, cs, cpp, vb</para>
<para>note, tip, implement, caller, inherit, caution, warning, important, security, cs, cpp, vb, todo</para>
</entry>
</row>
<row>
<entry>
<para>&#160;</para>
</entry>
<entry>
<para>title</para>
</entry>
<entry>
<para>&#160;</para>
</entry>
</row>
<row>
Expand Down
7 changes: 6 additions & 1 deletion Docs/ContentLayout.content
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@
<HelpKeywords>
<HelpKeyword index="K" term="version, history" />
</HelpKeywords>
<Topic id="16fd137b-699a-4260-906f-59d94818ff7a" visible="True" isSelected="true" title="Version 2021.7.5.0">
<Topic id="23ea721a-0a75-48c7-8457-7614bf3c4926" visible="True" isSelected="true" title="Version 2022.7.29.0">
<HelpKeywords>
<HelpKeyword index="K" term="versions, 2022.7.29.0" />
</HelpKeywords>
</Topic>
<Topic id="16fd137b-699a-4260-906f-59d94818ff7a" visible="True" title="Version 2021.7.5.0">
<HelpKeywords>
<HelpKeyword index="K" term="versions, 2021.7.5.0" />
</HelpKeywords>
Expand Down
75 changes: 25 additions & 50 deletions Docs/ExtendedDocCommentsProviderDocs.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,81 +13,55 @@
<RootNamespace>ExtendedDocCommentsProviderDocs</RootNamespace>
<Name>ExtendedDocCommentsProviderDocs</Name>
<!-- SHFB properties -->
<FrameworkVersion>.NET Framework 4.7.2</FrameworkVersion>
<FrameworkVersion>.NET Framework 4.8</FrameworkVersion>
<OutputPath>.\Help\</OutputPath>
<HtmlHelpName>ExtendedDocCommentsProvider</HtmlHelpName>
<Language>en-US</Language>
<TransformComponentArguments>
<Argument Key="logoFile" Value="" />
<Argument Key="logoHeight" Value="" />
<Argument Key="logoWidth" Value="" />
<Argument Key="logoAltText" Value="" />
<Argument Key="logoPlacement" Value="left" />
<Argument Key="logoAlignment" Value="left" />
<Argument Key="maxVersionParts" Value="" />
<Argument Key="defaultLanguage" Value="cs" />
<Argument Key="includeEnumValues" Value="true" />
<Argument Key="baseSourceCodeUrl" Value="" />
<Argument Key="requestExampleUrl" Value="" />
<Argument Key="RobotsMetadata" Value="" />
<Argument Key="BibliographyDataFile" Value="" />
<Argument Key="RootBreadcrumbTitleText" Value="Extended Doc Comments" />
<Argument Key="CollapsibleSections" Value="True" />
<Argument Key="LogoFile" Value="" />
<Argument Key="LogoHeight" Value="" />
<Argument Key="LogoWidth" Value="" />
<Argument Key="LogoAltText" Value="" />
<Argument Key="LogoPlacement" Value="Left" />
<Argument Key="LogoAlignment" Value="Left" />
<Argument Key="LogoUrl" Value="" />
<Argument Key="MaxVersionParts" Value="" />
<Argument Key="DefaultLanguage" Value="cs" />
<Argument Key="IncludeEnumValues" Value="True" />
<Argument Key="EnumMemberSortOrder" Value="Value" />
<Argument Key="FlagsEnumValueFormat" Value="IntegerValue" />
<Argument Key="FlagsEnumSeparatorSize" Value="0" />
<Argument Key="BaseSourceCodeUrl" Value="" />
<Argument Key="RequestExampleUrl" Value="" />
</TransformComponentArguments>
<PlugInConfigurations>
<PlugInConfig id="Additional Content Only" enabled="True">
<configuration />
</PlugInConfig>
<PlugInConfig id="Output Deployment" enabled="True">
<configuration deleteAfterDeploy="true" verboseLogging="false">
<deploymentLocation id="help1x" location="">
<userCredentials useDefault="true" userName="" password="" />
<proxyCredentials useProxy="false" proxyServer="">
<userCredentials useDefault="true" userName="" password="" />
</proxyCredentials>
</deploymentLocation>
<deploymentLocation id="helpViewer" location="" renameMSHA="false">
<userCredentials useDefault="true" userName="" password="" />
<proxyCredentials useProxy="false" proxyServer="">
<userCredentials useDefault="true" userName="" password="" />
</proxyCredentials>
</deploymentLocation>
<deploymentLocation id="website" location="..\Deployment\DocWebsite\">
<userCredentials useDefault="true" userName="" password="" />
<proxyCredentials useProxy="false" proxyServer="">
<userCredentials useDefault="true" userName="" password="" />
</proxyCredentials>
</deploymentLocation>
<deploymentLocation id="openXml" location="">
<userCredentials useDefault="true" userName="" password="" />
<proxyCredentials useProxy="false" proxyServer="">
<userCredentials useDefault="true" userName="" password="" />
</proxyCredentials>
</deploymentLocation>
<deploymentLocation id="markdown" location="">
<userCredentials useDefault="true" userName="" password="" />
<proxyCredentials useProxy="false" proxyServer="">
<userCredentials useDefault="true" userName="" password="" />
</proxyCredentials>
</deploymentLocation>
</configuration>
</PlugInConfig>
</PlugInConfigurations>
<PlugInConfig id="Output Deployment" enabled="True"><configuration deleteAfterDeploy="true" verboseLogging="false"><deploymentLocation id="help1x" location=""><userCredentials useDefault="true" userName="" password="" /><proxyCredentials useProxy="false" proxyServer=""><userCredentials useDefault="true" userName="" password="" /></proxyCredentials></deploymentLocation><deploymentLocation id="helpViewer" location="" renameMSHA="false"><userCredentials useDefault="true" userName="" password="" /><proxyCredentials useProxy="false" proxyServer=""><userCredentials useDefault="true" userName="" password="" /></proxyCredentials></deploymentLocation><deploymentLocation id="website" location="..\Deployment\DocWebsite\"><userCredentials useDefault="true" userName="" password="" /><proxyCredentials useProxy="false" proxyServer=""><userCredentials useDefault="true" userName="" password="" /></proxyCredentials></deploymentLocation><deploymentLocation id="openXml" location=""><userCredentials useDefault="true" userName="" password="" /><proxyCredentials useProxy="false" proxyServer=""><userCredentials useDefault="true" userName="" password="" /></proxyCredentials></deploymentLocation><deploymentLocation id="markdown" location=""><userCredentials useDefault="true" userName="" password="" /><proxyCredentials useProxy="false" proxyServer=""><userCredentials useDefault="true" userName="" password="" /></proxyCredentials></deploymentLocation></configuration></PlugInConfig></PlugInConfigurations>
<HelpFileFormat>Website</HelpFileFormat>
<SyntaxFilters>Standard</SyntaxFilters>
<PresentationStyle>VS2013</PresentationStyle>
<PresentationStyle>Default2022</PresentationStyle>
<CleanIntermediates>True</CleanIntermediates>
<KeepLogFile>True</KeepLogFile>
<DisableCodeBlockComponent>False</DisableCodeBlockComponent>
<IndentHtml>False</IndentHtml>
<BuildAssemblerVerbosity>OnlyWarningsAndErrors</BuildAssemblerVerbosity>
<SaveComponentCacheCapacity>100</SaveComponentCacheCapacity>
<HelpTitle>Extended XML Documentation Comments Provider</HelpTitle>
<HelpFileVersion>2019.10.27.0</HelpFileVersion>
<HelpFileVersion>2022.7.29.0</HelpFileVersion>
<NamingMethod>Guid</NamingMethod>
<ContentPlacement>AboveNamespaces</ContentPlacement>
<RootNamespaceContainer>False</RootNamespaceContainer>
<NamespaceGrouping>False</NamespaceGrouping>
<MaximumGroupParts>2</MaximumGroupParts>
<Preliminary>False</Preliminary>
<CopyrightHref>https://GitHub.com/EWSoftware/ExtendedDocCommentsProvider</CopyrightHref>
<CopyrightText>Copyright \xA9 2019, Eric Woodruff, All rights reserved</CopyrightText>
<CopyrightText>Copyright \xA9 2019-2022, Eric Woodruff, All rights reserved</CopyrightText>
<FeedbackEMailAddress>Eric%40EWoodruff.us</FeedbackEMailAddress>
<SdkLinkTarget>Blank</SdkLinkTarget>
<HtmlSdkLinkType>Msdn</HtmlSdkLinkType>
Expand Down Expand Up @@ -139,6 +113,7 @@
<None Include="Content\SystemRequirements.aml" />
<None Include="Content\VersionHistory\v2019.10.27.0.aml" />
<None Include="Content\VersionHistory\v2021.7.5.0.aml" />
<None Include="Content\VersionHistory\v2022.7.29.0.aml" />
<None Include="Content\VersionHistory\VersionHistory.aml" />
<None Include="Content\Welcome.aml" />
</ItemGroup>
Expand Down
33 changes: 24 additions & 9 deletions MasterBuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,41 @@ SETLOCAL

CD Source

ECHO *
ECHO * VS2019 and later package
ECHO *

REM Use MSBuild from whatever edition of Visual Studio is installed
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current" SET "MSBUILD=%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Current" SET "MSBUILD=%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current" SET "MSBUILD=%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\MSBuild\Current" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\bin\MSBuild.exe"

IF NOT EXIST "%MSBUILD%" GOTO End
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current" SET "MSBUILD2022=%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Current" SET "MSBUILD2022=%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current" SET "MSBUILD2022=%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\bin\MSBuild.exe"

IF NOT EXIST "%MSBUILD%" GOTO Build2022

"%MSBUILD%" ExtendedDocCommentsProvider.sln /nologo /v:m /m /t:Clean;Build "/p:Configuration=Release;Platform=Any CPU"
ECHO *
ECHO * VS2019 package
ECHO *

"%MSBUILD%" ExtendedDocCommentsProvider2019.sln /nologo /v:m /m /t:Clean;Build "/p:Configuration=Release;Platform=Any CPU"

IF ERRORLEVEL 1 GOTO End

:Build2022
IF NOT EXIST "%MSBUILD2022%" GOTO BuildDocs

ECHO *
ECHO * VS2022 and later package
ECHO *

"%MSBUILD2022%" ExtendedDocCommentsProvider2022.sln /nologo /v:m /m /t:Clean;Build "/p:Configuration=Release;Platform=Any CPU"

IF ERRORLEVEL 1 GOTO End

:BuildDocs
CD ..\

IF NOT EXIST "%MSBUILD%" SET "MSBUILD=%MSBUILD2022%"

IF NOT "%SHFBROOT%"=="" "%MSBUILD%" /nologo /v:m "Docs\ExtendedDocCommentsProviderDocs.sln" /t:Clean;Build "/p:Configuration=Release;Platform=Any CPU"

IF "%SHFBROOT%"=="" ECHO **** Sandcastle help file builder not installed. Skipping help build. ****
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// System : Extended Doc Comments Completion Provider Package
// File : CSharpXmlDocCommentsCompletionProvider.cs
// Author : Eric Woodruff ([email protected])
// Updated : 07/05/2021
// Note : Copyright 2019-2021, Eric Woodruff, All rights reserved
// Updated : 07/29/2021
// Note : Copyright 2019-2022, Eric Woodruff, All rights reserved
//
// This file contains the extended documentation comments completion provider for C#
//
Expand Down Expand Up @@ -194,7 +194,7 @@ private static async Task<IEnumerable<CompletionItem>> GetItemsAsync(Document do
var token = tree.FindTokenOnLeftOfPosition(position, cancellationToken);
var parentTrivia = token.Parent?.FirstAncestorOrSelf<DocumentationCommentTriviaSyntax>();

if(parentTrivia == null || parentTrivia.ParentTrivia.Token.Kind() == SyntaxKind.None)
if(parentTrivia == null || parentTrivia.ParentTrivia.Token.IsKind(SyntaxKind.None))
return null;

// Offer attribute names based on the element
Expand Down
11 changes: 6 additions & 5 deletions Source/ExtendedDocCommentsProvider.Shared/CommentsElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// System : Extended Doc Comments Completion Provider Package
// File : CommentsElement.cs
// Author : Eric Woodruff ([email protected])
// Updated : 10/22/2019
// Note : Copyright 2019, Eric Woodruff, All rights reserved
// Updated : 07/29/2022
// Note : Copyright 2019-2022, Eric Woodruff, All rights reserved
//
// This file contains the class used to define an XML documentation comments element
//
Expand All @@ -17,7 +17,7 @@
// 10/18/2019 EFW Created the code
//===============================================================================================================

// Ignore Spelling: cpp fs javascript vbnet html xml xsl xaml sql py pshell cref threadsafety href seealso
// Ignore Spelling: cpp fs javascript vbnet html xml xsl xaml sql py pshell cref threadsafety href seealso todo

using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -343,8 +343,9 @@ private static Dictionary<string, CommentsElement> CreateDefaultCommentElements(
Description = "Create a note within a topic to draw attention to some important information."
}.AddAttributes(new [] {
new ElementAttribute(new[] { "note", "tip", "implement", "caller", "inherit", "caution",
"warning", "important", "security", "cs", "cpp", "vb" }) {
Name = "type", Description = "Specifies the note type." }
"warning", "important", "security", "cs", "cpp", "vb", "todo" }) {
Name = "type", Description = "Specifies the note type." },
new ElementAttribute { Name = "title", Description = "An optional title override" }
}),
new CommentsElement
{
Expand Down
Loading

0 comments on commit 42f2950

Please sign in to comment.