Skip to content

Commit

Permalink
Completed move to the shared project
Browse files Browse the repository at this point in the history
Have now migrated all of the code and content into the shared project
with VsVim now just referencing that + having linked files into it. This
should now essentially be the template for the VsVim2017 project.
  • Loading branch information
jaredpar committed Jul 4, 2021
1 parent 6af2afc commit 195ff53
Show file tree
Hide file tree
Showing 26 changed files with 70 additions and 278 deletions.
5 changes: 5 additions & 0 deletions SharedTodo.txt
Expand Up @@ -13,4 +13,9 @@ Order of operations
- Need to think about how to handle the VsVimTest project. Does that become another shared
project?
- Remove all TODO_SHARED
- Clean up all the #if options for old VS versions
- Delete all of the uses of "Specific" in namespaces (sign of the old code pattern)
- Release file needs to check consistentcy of all source.extension.manifest file constants

https://docs.microsoft.com/en-us/visualstudio/extensibility/migration/update-visual-studio-extension?view=vs-2022#use-shared-projects-for-multi-targeting

3 changes: 1 addition & 2 deletions Src/VimApp/VimAppHost.cs
Expand Up @@ -13,7 +13,6 @@
using Microsoft.FSharp.Core;
using Vim.Extensions;
using Vim.Interpreter;
using Vim.VisualStudio.Specific;
using System.Collections.Generic;

namespace VimApp
Expand All @@ -36,7 +35,7 @@ internal sealed class VimAppHost : Vim.UI.Wpf.VimHost
private IVimWindowManager _vimWindowManager;
private IVim _vim;

public override string HostIdentifier => VimSpecificUtil.HostIdentifier;
public override string HostIdentifier => "Vim App";

internal IVimWindowManager VimWindowManager
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Src/VimSpecific/VimSpecificUtil.cs
Expand Up @@ -39,7 +39,7 @@ internal static class VimSpecificUtil
internal static TypeCatalog GetTypeCatalog()
{
var list = new List<Type>()
{
{
#if VS_SPECIFIC_2019
typeof(Implementation.WordCompletion.Async.WordAsyncCompletionSourceProvider),
#elif !VS_SPECIFIC_MAC
Expand Down
3 changes: 1 addition & 2 deletions Src/VimTestUtils/Mock/MockVimHost.cs
Expand Up @@ -7,7 +7,6 @@
using Microsoft.VisualStudio.Text.Editor;
using Vim.Extensions;
using Vim.Interpreter;
using Vim.VisualStudio.Specific;
using System.Collections.Generic;

namespace Vim.UnitTest.Mock
Expand All @@ -25,7 +24,7 @@ public class MockVimHost : IVimHost
public bool AutoSynchronizeSettings { get; set; }
public bool IsAutoCommandEnabled { get; set; }
public bool IsUndoRedoExpected { get; set; }
public string HostIdentifier { get; } = VimSpecificUtil.HostIdentifier;
public string HostIdentifier { get; } = "Mock Vim Host";
public DefaultSettings DefaultSettings { get; set; }
public bool EnsuredPackageLoaded { get; private set; }
public int BeepCount { get; set; }
Expand Down
1 change: 1 addition & 0 deletions Src/VimTestUtils/VimTestUtils.csproj
Expand Up @@ -31,4 +31,5 @@
<ProjectReference Include="..\VimEditorHost\VimEditorHost.csproj" />
<ProjectReference Include="..\VimWpf\VimWpf.csproj" />
</ItemGroup>
<Import Project="..\VimSpecific\VimSpecific.projitems" Label="Shared" />
</Project>
90 changes: 0 additions & 90 deletions Src/VsVim/Properties/Resources.Designer.cs

This file was deleted.

129 changes: 0 additions & 129 deletions Src/VsVim/Properties/Resources.resx

This file was deleted.

90 changes: 40 additions & 50 deletions Src/VsVim/VsVim.csproj
Expand Up @@ -21,6 +21,46 @@
<!-- This is needed to prevent forced migrations when opening the project in Vs2017 -->
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Properties\Resources.Designer.cs" />
</ItemGroup>
<ItemGroup>
<!-- Shared items -->
<Content Include="..\VsVimShared\Metadata\Images_32bit.bmp" Link="Images_32bit.bmp" />
<Content Include="..\VsVimShared\Metadata\KeyboardInputRouting.txt" Link="KeyboardInputRouting.txt" />
<Content Include="..\VsVimShared\Metadata\License.txt" Link="License.txt" >
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\VsVimShared\Metadata\Package.ico" Link="Package.ico" />
<Content Include="..\VsVimShared\Metadata\VsVim_large.png" Link="VsVim_large.png">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\VsVimShared\Metadata\VsVim_small.png" Link="VsVim_small.png">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\VsVimShared\Metadata\Colors.pkgdef" Link="Colors.pkgdef" >
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\VsVimShared\Metadata\VsVim_full.pdf" Link="VsVim_full.pdf">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\VsVimShared\Metadata\VsVim.vsct" Link="VsVim.vsct" />
<VSCTCompile Include="..\VsVimShared\Metadata\VsVim.vsct">
<ResourceName>Menus.ctmenu</ResourceName>
<SubType>Designer</SubType>
</VSCTCompile>

<!-- Non shared items -->
<None Include="app.config" />
<None Include="source.extension.vsixmanifest">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Expand Down Expand Up @@ -66,53 +106,6 @@
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<!-- TODO: Clean up all of these item groups -->
<ItemGroup>
<Content Include="VsVim_large.png">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="VsVim_small.png">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Colors.pkgdef">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="License.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<None Include="app.config" />
<None Include="source.extension.vsixmanifest">
<SubType>Designer</SubType>
</None>
<EmbeddedResource Include="Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="VSPackage.resx">
<MergeWithCTO>true</MergeWithCTO>
<ManifestResourceName>VSPackage</ManifestResourceName>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<VSCTCompile Include="VsVim.vsct">
<ResourceName>Menus.ctmenu</ResourceName>
<SubType>Designer</SubType>
</VSCTCompile>
</ItemGroup>
<ItemGroup>
<None Include="Resources\Images_32bit.bmp" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\Package.ico" />
</ItemGroup>
<!-- TODO: Can this be moved up? -->
<PropertyGroup>
</PropertyGroup>
Expand All @@ -131,8 +124,5 @@
<ForceIncludeInVSIX>true</ForceIncludeInVSIX>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="KeyboardInputRouting.txt" />
</ItemGroup>
<Import Project="..\VsVimShared\VsVimShared.projitems" Label="Shared" />
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -143,7 +143,7 @@
bitmap strip containing the bitmaps and then there are the numeric ids of the elements used
inside a button definition. An important aspect of this declaration is that the element id
must be the actual index (1-based) of the bitmap inside the bitmap strip. -->
<Bitmap guid="guidImages" href="Resources\Images_32bit.bmp" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows" />
<Bitmap guid="guidImages" href="Images_32bit.bmp" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows" />

</Bitmaps>

Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.

0 comments on commit 195ff53

Please sign in to comment.