Skip to content

Commit

Permalink
Add SonarLint package in the list of installed extension in the Help/… (
Browse files Browse the repository at this point in the history
#160)

...About of Visual Studio

Fix #156
  • Loading branch information
Amaury Levé authored May 8, 2017
1 parent a250bbf commit a201ba5
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
9 changes: 8 additions & 1 deletion build/ChangeVersion.proj
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,24 @@
<ReplaceWith>$(VsixVersion)</ReplaceWith>
<ExpectedMatchCount>1</ExpectedMatchCount>
</VsixVersion>
<VsixVersion Include="$(SolutionRoot)\src\Integration.Vsix_2017\source.extension.vsixmanifest">
<VsixVersion Include="$(SolutionRoot)\src\Integration.Vsix_2017\source.extension.vsixmanifest">
<Find>(?&lt;=Identity.*Version=")([^"]*)</Find>
<ReplaceWith>$(VsixVersion)</ReplaceWith>
<ExpectedMatchCount>1</ExpectedMatchCount>
</VsixVersion>

<VsPackageVersion Include="$(SolutionRoot)\src\Integration.Vsix\SonarLintIntegrationPackage.cs">
<Find>(?&lt;=\[InstalledProductRegistration\("#110", "#112", ")([^"]*)</Find>
<ReplaceWith>$(AssemblyFileVersion)</ReplaceWith>
<ExpectedMatchCount>1</ExpectedMatchCount>
</VsPackageVersion>
</ItemGroup>

<Target Name="UpdateAssemblyVersion">
<RegexTransform Items="@(AssemblyVersion)" />
<RegexTransform Items="@(AssemblyFileVersion)" />
<RegexTransform Items="@(AssemblyInformationalVersion)" />
<RegexTransform Items="@(VsixVersion)" />
<RegexTransform Items="@(VsPackageVersion)" />
</Target>
</Project>
2 changes: 2 additions & 0 deletions src/Integration.Vsix/Integration.Vsix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
<HintPath>..\..\packages\System.Diagnostics.StackTrace.4.3.0\lib\net46\System.Diagnostics.StackTrace.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -482,6 +483,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<None Include="Resources\sonarlint_32px.ico" />
<Content Include="Telemetry\GeneratedCode\SqmVsCommands.vsct">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
Expand Down
12 changes: 12 additions & 0 deletions src/Integration.Vsix/Resources/PackageStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="110" xml:space="preserve">
<value>SonarLint for Visual Studio</value>
<comment>Package name in the Help/About</comment>
</data>
<data name="112" xml:space="preserve">
<value>SonarLint is an extension to your favorite IDE that provides on-the-fly feedback to developers on new bugs and quality issues injected into their code.</value>
<comment>Package description in the Help/About</comment>
</data>
<data name="901" xml:space="preserve">
<value>SonarLint for Visual Studio</value>
<comment>Options group name</comment>
Expand All @@ -133,4 +141,8 @@
<value>Other</value>
<comment>Other options page name</comment>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="400" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>sonarlint_32px.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file added src/Integration.Vsix/Resources/sonarlint_32px.ico
Binary file not shown.
10 changes: 7 additions & 3 deletions src/Integration.Vsix/SonarLintIntegrationPackage.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* SonarLint for Visual Studio
* Copyright (C) 2016-2017 SonarSource SA
* mailto:info AT sonarsource DOT com
Expand All @@ -18,16 +18,21 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

using Microsoft.VisualStudio.Shell;
using System;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.Shell;

namespace SonarLint.VisualStudio.Integration.Vsix
{
// Register this class as a VS package.
[PackageRegistration(UseManagedResourcesOnly = true)]
[Guid(CommonGuids.Package)]
[ProvideBindingPath]
// Specify when to load the extension (GUID can be found in Microsoft.VisualStudio.VSConstants.UICONTEXT)
[ProvideAutoLoad(CommonGuids.PackageActivation)]
// Register the information needed to show the package in the Help/About dialog of VS.
// NB: The version is automatically updated by the ChangeVersion.proj
[InstalledProductRegistration("#110", "#112", "3.0.0.0", IconResourceID = 400)]
[ProvideOptionPage(typeof(GeneralOptionsDialogPage), "SonarLint", GeneralOptionsDialogPage.PageName, 901, 902, false, 903)]
[ProvideOptionPage(typeof(OtherOptionsDialogPage), "SonarLint", OtherOptionsDialogPage.PageName, 901, 904, true)]
[ProvideUIContextRule(CommonGuids.PackageActivation, "SonarLintIntegrationPackageActivation",
Expand All @@ -37,7 +42,6 @@ namespace SonarLint.VisualStudio.Integration.Vsix
new string[] { "SolutionHasProjectCapability:CSharp",
"SolutionHasProjectCapability:VB" }
)]

[System.Diagnostics.CodeAnalysis.SuppressMessage("Reliability",
"S2931:Classes with \"IDisposable\" members should implement \"IDisposable\"",
Justification = "By-Design. The base class exposes a Dispose override in which the disposable instances will be disposed",
Expand Down
2 changes: 2 additions & 0 deletions src/Integration.Vsix_2017/Integration.Vsix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@
<HintPath>..\..\packages\System.Diagnostics.StackTrace.4.3.0\lib\net46\System.Diagnostics.StackTrace.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -476,6 +477,7 @@
<IncludeInVSIX>true</IncludeInVSIX>
<Link>Resources\sonarlint_32.png</Link>
</Content>
<None Include="Resources\sonarlint_32px.ico" />
<Content Include="$(ReferencedDirectory)\Telemetry\GeneratedCode\SqmVsCommands.vsct">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
Expand Down

0 comments on commit a201ba5

Please sign in to comment.