Skip to content

Commit

Permalink
Rename to CodeConverter from ReConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamTheCoder committed Mar 1, 2020
1 parent 736ddae commit 765887a
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Vsix/CodeConversion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal class CodeConversion

private string SolutionDir => Path.GetDirectoryName(_visualStudioWorkspace.CurrentSolution.FilePath);

public static async Task<CodeConversion> CreateAsync(REConverterPackage serviceProvider, VisualStudioWorkspace visualStudioWorkspace, Func<Task<ConverterOptionsPage>> getOptions)
public static async Task<CodeConversion> CreateAsync(CodeConverterPackage serviceProvider, VisualStudioWorkspace visualStudioWorkspace, Func<Task<ConverterOptionsPage>> getOptions)
{
return new CodeConversion(serviceProvider, serviceProvider.JoinableTaskFactory, serviceProvider.PackageCancellation, visualStudioWorkspace,
getOptions, await OutputWindow.CreateAsync());
Expand Down
4 changes: 2 additions & 2 deletions Vsix/REConverterPackage.cs → Vsix/CodeConverterPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace CodeConverter.VsExtension
expression: "HasVbproj", termNames: new[] { "HasVbproj" },
termValues: new[] { "SolutionHasProjectCapability:VB" })]
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")]
public sealed class REConverterPackage : AsyncPackage
public sealed class CodeConverterPackage : AsyncPackage
{
/// <summary>
/// ConvertCSToVBCommandPackage GUID string.
Expand All @@ -89,7 +89,7 @@ public sealed class REConverterPackage : AsyncPackage
/// <summary>
/// Initializes a new instance of package class.
/// </summary>
public REConverterPackage()
public CodeConverterPackage()
{
var thisAssembly = GetType().Assembly;
_thisAssemblyName = thisAssembly.GetName();
Expand Down
6 changes: 3 additions & 3 deletions Vsix/ConvertCSToVBCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal sealed class ConvertCSToVBCommand
/// <summary>
/// VS Package that provides this command, not null.
/// </summary>
private readonly REConverterPackage _package;
private readonly CodeConverterPackage _package;

private readonly CodeConversion _codeConversion;

Expand All @@ -62,7 +62,7 @@ private IAsyncServiceProvider ServiceProvider {
/// <remarks>
/// Must be called from UI thread
/// </remarks>
public static void Initialize(REConverterPackage package, OleMenuCommandService menuCommandService, CodeConversion codeConversion)
public static void Initialize(CodeConverterPackage package, OleMenuCommandService menuCommandService, CodeConversion codeConversion)
{
ThreadHelper.ThrowIfNotOnUIThread();
Instance = new ConvertCSToVBCommand(package, codeConversion, menuCommandService);
Expand All @@ -76,7 +76,7 @@ public static void Initialize(REConverterPackage package, OleMenuCommandService
/// <param name="codeConversion"></param>
/// <param name="commandService"></param>
/// <remarks>Must be called on the UI thread due to VS 2017's implementation of AddCommand which calls GetService</remarks>
private ConvertCSToVBCommand(REConverterPackage package, CodeConversion codeConversion, OleMenuCommandService commandService)
private ConvertCSToVBCommand(CodeConverterPackage package, CodeConversion codeConversion, OleMenuCommandService commandService)
{
ThreadHelper.ThrowIfNotOnUIThread();
this._package = package ?? throw new ArgumentNullException(nameof(package));
Expand Down
6 changes: 3 additions & 3 deletions Vsix/ConvertVBToCSCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ internal sealed class ConvertVBToCSCommand
/// <summary>
/// VS Package that provides this command, not null.
/// </summary>
private readonly REConverterPackage _package;
private readonly CodeConverterPackage _package;

private readonly CodeConversion _codeConversion;

Expand All @@ -61,7 +61,7 @@ private IAsyncServiceProvider ServiceProvider {
/// <remarks>
/// Must be called from UI thread
/// </remarks>
public static void Initialize(REConverterPackage package, OleMenuCommandService menuCommandService, CodeConversion codeConversion)
public static void Initialize(CodeConverterPackage package, OleMenuCommandService menuCommandService, CodeConversion codeConversion)
{
ThreadHelper.ThrowIfNotOnUIThread();
Instance = new ConvertVBToCSCommand(package, codeConversion, menuCommandService);
Expand All @@ -75,7 +75,7 @@ public static void Initialize(REConverterPackage package, OleMenuCommandService
/// <param name="codeConversion"></param>
/// <param name="commandService"></param>
/// <remarks>Must be called on the UI thread due to VS 2017's implementation of AddCommand which calls GetService</remarks>
private ConvertVBToCSCommand(REConverterPackage package, CodeConversion codeConversion, OleMenuCommandService commandService)
private ConvertVBToCSCommand(CodeConverterPackage package, CodeConversion codeConversion, OleMenuCommandService commandService)
{
ThreadHelper.ThrowIfNotOnUIThread();
this._package = package ?? throw new ArgumentNullException(nameof(package));
Expand Down
92 changes: 46 additions & 46 deletions Vsix/REConverterPackage.vsct
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,57 @@
<Extern href="stdidcmd.h"/>
<Extern href="vsshlids.h"/>

<Commands package="guidREConverterPackage">
<Commands package="guidCodeConverterPackage">
<Groups>
<Group guid="guidREConverterCommandPackageCmdSet" id="REConverterMenuGroup" priority="0x0300">
<Group guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterMenuGroup" priority="0x0300">
<Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_EDIT"/>
</Group>
<Group guid="guidREConverterCommandPackageCmdSet" id="REConverterCtxMenuGroup" priority="0x0300">
<Group guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterCtxMenuGroup" priority="0x0300">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/>
</Group>
<Group guid="guidREConverterCommandPackageCmdSet" id="REConverterProjectItemCtxMenuGroup" priority="0x0300">
<Group guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterProjectItemCtxMenuGroup" priority="0x0300">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_ITEMNODE"/>
</Group>
<Group guid="guidREConverterCommandPackageCmdSet" id="REConverterProjectCtxMenuGroup" priority="0x0300" />
<Group guid="guidREConverterCommandPackageCmdSet" id="REConverterSolutionCtxMenuGroup" priority="0x0300" />
<Group guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterProjectCtxMenuGroup" priority="0x0300" />
<Group guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterSolutionCtxMenuGroup" priority="0x0300" />
</Groups>

<Buttons>
<!-- C# to VB conversion commands -->
<Button guid="guidREConverterCommandPackageCmdSet" id="ConvertCSToVBCommandId" type="Button" priority="0x0300">
<Parent guid="guidREConverterCommandPackageCmdSet" id="REConverterMenuGroup" />
<Button guid="guidCodeConverterCommandPackageCmdSet" id="ConvertCSToVBCommandId" type="Button" priority="0x0300">
<Parent guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterMenuGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<ButtonText>Convert to VB</ButtonText>
</Strings>
</Button>
<Button guid="guidREConverterCommandPackageCmdSet" id="ConvertCSToVBCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidREConverterCommandPackageCmdSet" id="REConverterCtxMenuGroup" />
<Button guid="guidCodeConverterCommandPackageCmdSet" id="ConvertCSToVBCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterCtxMenuGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<ButtonText>Convert to VB</ButtonText>
</Strings>
</Button>
<Button guid="guidREConverterCommandPackageCmdSet" id="ConvertCSToVBProjectItemCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidREConverterCommandPackageCmdSet" id="REConverterProjectItemCtxMenuGroup" />
<Button guid="guidCodeConverterCommandPackageCmdSet" id="ConvertCSToVBProjectItemCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterProjectItemCtxMenuGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<ButtonText>Convert to VB</ButtonText>
</Strings>
</Button>
<Button guid="guidREConverterCommandPackageCmdSet" id="ConvertCSToVBProjectCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidREConverterCommandPackageCmdSet" id="REConverterProjectCtxMenuGroup" />
<Button guid="guidCodeConverterCommandPackageCmdSet" id="ConvertCSToVBProjectCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterProjectCtxMenuGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<ButtonText>Convert to VB</ButtonText>
</Strings>
</Button>
<Button guid="guidREConverterCommandPackageCmdSet" id="ConvertCSToVBSolutionCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidREConverterCommandPackageCmdSet" id="REConverterSolutionCtxMenuGroup" />
<Button guid="guidCodeConverterCommandPackageCmdSet" id="ConvertCSToVBSolutionCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterSolutionCtxMenuGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
Expand All @@ -63,40 +63,40 @@
</Button>

<!-- VB to C# conversion commands -->
<Button guid="guidREConverterCommandPackageCmdSet" id="ConvertVBToCSCommandId" type="Button" priority="0x0300">
<Parent guid="guidREConverterCommandPackageCmdSet" id="REConverterMenuGroup" />
<Button guid="guidCodeConverterCommandPackageCmdSet" id="ConvertVBToCSCommandId" type="Button" priority="0x0300">
<Parent guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterMenuGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<ButtonText>Convert to C#</ButtonText>
</Strings>
</Button>
<Button guid="guidREConverterCommandPackageCmdSet" id="ConvertVBToCSCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidREConverterCommandPackageCmdSet" id="REConverterCtxMenuGroup" />
<Button guid="guidCodeConverterCommandPackageCmdSet" id="ConvertVBToCSCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterCtxMenuGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<ButtonText>Convert to C#</ButtonText>
</Strings>
</Button>
<Button guid="guidREConverterCommandPackageCmdSet" id="ConvertVBToCSProjectItemCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidREConverterCommandPackageCmdSet" id="REConverterProjectItemCtxMenuGroup" />
<Button guid="guidCodeConverterCommandPackageCmdSet" id="ConvertVBToCSProjectItemCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterProjectItemCtxMenuGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<ButtonText>Convert to C#</ButtonText>
</Strings>
</Button>
<Button guid="guidREConverterCommandPackageCmdSet" id="ConvertVBToCSProjectCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidREConverterCommandPackageCmdSet" id="REConverterProjectCtxMenuGroup" />
<Button guid="guidCodeConverterCommandPackageCmdSet" id="ConvertVBToCSProjectCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterProjectCtxMenuGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<ButtonText>Convert to C#</ButtonText>
</Strings>
</Button>
<Button guid="guidREConverterCommandPackageCmdSet" id="ConvertVBToCSSolutionCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidREConverterCommandPackageCmdSet" id="REConverterSolutionCtxMenuGroup" />
<Button guid="guidCodeConverterCommandPackageCmdSet" id="ConvertVBToCSSolutionCtxCommandId" type="Button" priority="0x0300">
<Parent guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterSolutionCtxMenuGroup" />
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
Expand All @@ -106,30 +106,30 @@
</Buttons>
</Commands>
<VisibilityConstraints>
<VisibilityItem guid="guidREConverterCommandPackageCmdSet" id="ConvertCSToVBCommandId" context="CsEditorMenuVisibilityGuid" />
<VisibilityItem guid="guidREConverterCommandPackageCmdSet" id="ConvertVBToCSCommandId" context="VbEditorMenuVisibilityGuid" />
<VisibilityItem guid="guidREConverterCommandPackageCmdSet" id="ConvertCSToVBCtxCommandId" context="CsEditorMenuVisibilityGuid" />
<VisibilityItem guid="guidREConverterCommandPackageCmdSet" id="ConvertVBToCSCtxCommandId" context="VbEditorMenuVisibilityGuid" />
<VisibilityItem guid="guidREConverterCommandPackageCmdSet" id="ConvertCSToVBProjectItemCtxCommandId" context="CsFileMenuVisibilityGuid" />
<VisibilityItem guid="guidREConverterCommandPackageCmdSet" id="ConvertVBToCSProjectItemCtxCommandId" context="VbFileMenuVisibilityGuid" />
<VisibilityItem guid="guidREConverterCommandPackageCmdSet" id="ConvertCSToVBProjectCtxCommandId" context="CsProjMenuVisibilityGuid" />
<VisibilityItem guid="guidREConverterCommandPackageCmdSet" id="ConvertVBToCSProjectCtxCommandId" context="VbProjMenuVisibilityGuid" />
<VisibilityItem guid="guidREConverterCommandPackageCmdSet" id="ConvertCSToVBSolutionCtxCommandId" context="CsSolutionMenuVisibilityGuid" />
<VisibilityItem guid="guidREConverterCommandPackageCmdSet" id="ConvertVBToCSSolutionCtxCommandId" context="VbSolutionMenuVisibilityGuid" />
<VisibilityItem guid="guidCodeConverterCommandPackageCmdSet" id="ConvertCSToVBCommandId" context="CsEditorMenuVisibilityGuid" />
<VisibilityItem guid="guidCodeConverterCommandPackageCmdSet" id="ConvertVBToCSCommandId" context="VbEditorMenuVisibilityGuid" />
<VisibilityItem guid="guidCodeConverterCommandPackageCmdSet" id="ConvertCSToVBCtxCommandId" context="CsEditorMenuVisibilityGuid" />
<VisibilityItem guid="guidCodeConverterCommandPackageCmdSet" id="ConvertVBToCSCtxCommandId" context="VbEditorMenuVisibilityGuid" />
<VisibilityItem guid="guidCodeConverterCommandPackageCmdSet" id="ConvertCSToVBProjectItemCtxCommandId" context="CsFileMenuVisibilityGuid" />
<VisibilityItem guid="guidCodeConverterCommandPackageCmdSet" id="ConvertVBToCSProjectItemCtxCommandId" context="VbFileMenuVisibilityGuid" />
<VisibilityItem guid="guidCodeConverterCommandPackageCmdSet" id="ConvertCSToVBProjectCtxCommandId" context="CsProjMenuVisibilityGuid" />
<VisibilityItem guid="guidCodeConverterCommandPackageCmdSet" id="ConvertVBToCSProjectCtxCommandId" context="VbProjMenuVisibilityGuid" />
<VisibilityItem guid="guidCodeConverterCommandPackageCmdSet" id="ConvertCSToVBSolutionCtxCommandId" context="CsSolutionMenuVisibilityGuid" />
<VisibilityItem guid="guidCodeConverterCommandPackageCmdSet" id="ConvertVBToCSSolutionCtxCommandId" context="VbSolutionMenuVisibilityGuid" />
</VisibilityConstraints>
<CommandPlacements>
<CommandPlacement guid="guidREConverterCommandPackageCmdSet" id="REConverterProjectCtxMenuGroup" priority="0x0300">
<CommandPlacement guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterProjectCtxMenuGroup" priority="0x0300">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/>
</CommandPlacement>
<CommandPlacement guid="guidREConverterCommandPackageCmdSet" id="REConverterProjectCtxMenuGroup" priority="0x0300">
<CommandPlacement guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterProjectCtxMenuGroup" priority="0x0300">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_XPROJ_MULTIPROJ"/>
</CommandPlacement>
<CommandPlacement guid="guidREConverterCommandPackageCmdSet" id="REConverterSolutionCtxMenuGroup" priority="0x0300">
<CommandPlacement guid="guidCodeConverterCommandPackageCmdSet" id="CodeConverterSolutionCtxMenuGroup" priority="0x0300">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_SOLNNODE"/>
</CommandPlacement>
</CommandPlacements>
<Symbols>
<GuidSymbol name="guidREConverterPackage" value="{60378c8b-d75c-4fb2-aa2b-58609d67f886}" />
<GuidSymbol name="guidCodeConverterPackage" value="{60378c8b-d75c-4fb2-aa2b-58609d67f886}" />

<GuidSymbol name="CsEditorMenuVisibilityGuid" value="{64448be3-dcfe-467c-8659-408d672a9909}" />
<GuidSymbol name="VbEditorMenuVisibilityGuid" value="{8eb86734-0b20-4986-9f20-9ed22824d0e2}" />
Expand All @@ -141,12 +141,12 @@
<GuidSymbol name="VbSolutionMenuVisibilityGuid" value="{3332e9e5-019c-4e93-b75a-2499f6f1cec6}" />

<!-- This is the guid used to group the menu commands together -->
<GuidSymbol name="guidREConverterCommandPackageCmdSet" value="{a3378a21-e939-40c9-9e4b-eb0cec7b7854}">
<IDSymbol name="REConverterMenuGroup" value="0x1020" />
<IDSymbol name="REConverterCtxMenuGroup" value="0x1021" />
<IDSymbol name="REConverterProjectItemCtxMenuGroup" value="0x1022" />
<IDSymbol name="REConverterProjectCtxMenuGroup" value="0x1023" />
<IDSymbol name="REConverterSolutionCtxMenuGroup" value="0x1024" />
<GuidSymbol name="guidCodeConverterCommandPackageCmdSet" value="{a3378a21-e939-40c9-9e4b-eb0cec7b7854}">
<IDSymbol name="CodeConverterMenuGroup" value="0x1020" />
<IDSymbol name="CodeConverterCtxMenuGroup" value="0x1021" />
<IDSymbol name="CodeConverterProjectItemCtxMenuGroup" value="0x1022" />
<IDSymbol name="CodeConverterProjectCtxMenuGroup" value="0x1023" />
<IDSymbol name="CodeConverterSolutionCtxMenuGroup" value="0x1024" />
<IDSymbol name="ConvertCSToVBCommandId" value="0x0100" />
<IDSymbol name="ConvertCSToVBCtxCommandId" value="0x0101" />
<IDSymbol name="ConvertCSToVBProjectItemCtxCommandId" value="0x0102" />
Expand Down
2 changes: 1 addition & 1 deletion Vsix/Vsix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<Compile Include="ConvertVBToCSCommand.cs" />
<Compile Include="OutputWindow.cs" />
<Compile Include="Cancellation.cs" />
<Compile Include="REConverterPackage.cs" />
<Compile Include="CodeConverterPackage.cs" />
<Compile Include="ServiceProviderExtensions.cs" />
<Compile Include="SolutionProjectExtensions.cs" />
<Compile Include="TaskExtensions.cs" />
Expand Down

0 comments on commit 765887a

Please sign in to comment.