Skip to content

Commit 237cc71

Browse files
committed
Removed GtmPackage.
1 parent 24d7faf commit 237cc71

3 files changed

Lines changed: 6 additions & 75 deletions

File tree

src/GtmExtension/GtmExtension.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="..\..\packages\Microsoft.VSSDK.BuildTools.15.8.3246\build\Microsoft.VSSDK.BuildTools.props" Condition="Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.8.3246\build\Microsoft.VSSDK.BuildTools.props')" />
44
<PropertyGroup>
@@ -26,7 +26,7 @@
2626
<RootNamespace>GtmExtension</RootNamespace>
2727
<AssemblyName>GtmExtension</AssemblyName>
2828
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
29-
<GeneratePkgDefFile>true</GeneratePkgDefFile>
29+
<GeneratePkgDefFile>false</GeneratePkgDefFile>
3030
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
3131
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
3232
<IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
@@ -54,7 +54,7 @@
5454
<WarningLevel>4</WarningLevel>
5555
</PropertyGroup>
5656
<ItemGroup>
57-
<Compile Include="GtmPackage.cs" />
57+
<Compile Include="GtmListener.cs" />
5858
<Compile Include="Properties\AssemblyInfo.cs" />
5959
</ItemGroup>
6060
<ItemGroup>
@@ -194,4 +194,4 @@
194194
<Target Name="AfterBuild">
195195
</Target>
196196
-->
197-
</Project>
197+
</Project>
Lines changed: 2 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -11,80 +11,10 @@
1111
using System;
1212
using System.ComponentModel;
1313
using System.ComponentModel.Composition;
14-
using System.Diagnostics.CodeAnalysis;
15-
using System.Runtime.InteropServices;
16-
using System.Threading;
1714
using Process = System.Diagnostics.Process;
18-
using Task = System.Threading.Tasks.Task;
1915

2016
namespace GtmExtension
2117
{
22-
/// <summary>
23-
/// This is the class that implements the package exposed by this assembly.
24-
/// </summary>
25-
/// <remarks>
26-
/// <para>
27-
/// The minimum requirement for a class to be considered a valid package for Visual Studio
28-
/// is to implement the IVsPackage interface and register itself with the shell.
29-
/// This package uses the helper classes defined inside the Managed Package Framework (MPF)
30-
/// to do it: it derives from the Package class that provides the implementation of the
31-
/// IVsPackage interface and uses the registration attributes defined in the framework to
32-
/// register itself and its components with the shell. These attributes tell the pkgdef creation
33-
/// utility what data to put into .pkgdef file.
34-
/// </para>
35-
/// <para>
36-
/// To get loaded into VS, the package must be referred by &lt;Asset Type="Microsoft.VisualStudio.VsPackage" ...&gt; in .vsixmanifest file.
37-
/// </para>
38-
/// </remarks>
39-
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
40-
[InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] // Info on this package for Help/About
41-
[Guid(PackageGuidString)]
42-
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")]
43-
[ProvideAutoLoad(UIContextGuids80.SolutionExists, PackageAutoLoadFlags.BackgroundLoad)] // Load the extension when a solution is open.
44-
public sealed class GtmPackage : AsyncPackage
45-
{
46-
/// <summary>
47-
/// GtmPackage GUID string.
48-
/// </summary>
49-
public const string PackageGuidString = "208330cb-08c8-4105-b9b2-8f010fbeaf49";
50-
51-
/// <summary>
52-
/// Initializes a new instance of the <see cref="GtmPackage"/> class.
53-
/// </summary>
54-
public GtmPackage()
55-
{
56-
// Inside this method you can place any initialization code that does not require
57-
// any Visual Studio service because at this point the package object is created but
58-
// not sited yet inside Visual Studio environment. The place to do all the other
59-
// initialization is the Initialize method.
60-
}
61-
62-
#region Package Members
63-
64-
/// <summary>
65-
/// Initialization of the package; this method is called right after the package is sited, so this is the place
66-
/// where you can put all the initialization code that rely on services provided by VisualStudio.
67-
/// </summary>
68-
/// <param name="cancellationToken">A cancellation token to monitor for initialization cancellation, which can occur when VS is shutting down.</param>
69-
/// <param name="progress">A provider for progress updates.</param>
70-
/// <returns>A task representing the async work of package initialization, or an already completed task if there is none. Do not return null from this method.</returns>
71-
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
72-
{
73-
}
74-
75-
#endregion
76-
}
77-
78-
[Export(typeof(IVsTextViewCreationListener))]
79-
[ContentType("text")]
80-
[TextViewRole(PredefinedTextViewRoles.Editable)]
81-
public sealed class AnotherListener : IVsTextViewCreationListener
82-
{
83-
public void VsTextViewCreated(IVsTextView textViewAdapter)
84-
{
85-
}
86-
}
87-
8818
[Export(typeof(IVsTextViewCreationListener))]
8919
[ContentType("text")]
9020
[TextViewRole(PredefinedTextViewRoles.Editable)]
@@ -102,8 +32,10 @@ public sealed class GtmListener : IVsTextViewCreationListener
10232
private static readonly TimeSpan updateInterval = TimeSpan.FromSeconds(30.0);
10333

10434
#region Imports
35+
10536
[Import]
10637
public SVsServiceProvider ServiceProvider { get; set; }
38+
10739
#endregion
10840

10941
#region Helper Functions

src/GtmExtension/source.extension.vsixmanifest

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
1717
</Prerequisites>
1818
<Assets>
19-
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
2019
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
2120
</Assets>
2221
</PackageManifest>

0 commit comments

Comments
 (0)