From 79bc9de904e97cf80cc5bb811dcafd8473a750f0 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Sun, 18 Jul 2021 13:35:15 +0200 Subject: [PATCH] Combine all "Open reference" commands to avoid duplicate code --- ILSpy.AddIn/Commands/OpenReferenceCommand.cs | 8 ++++---- ILSpy.AddIn/ILSpyAddIn.en-US.vsct | 20 -------------------- ILSpy.AddIn/ILSpyAddIn.vsct | 18 ++++++++---------- ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct | 20 -------------------- ILSpy.AddIn/ILSpyAddInPackage.cs | 4 +--- ILSpy.AddIn/PkgCmdID.cs | 2 -- 6 files changed, 13 insertions(+), 59 deletions(-) diff --git a/ILSpy.AddIn/Commands/OpenReferenceCommand.cs b/ILSpy.AddIn/Commands/OpenReferenceCommand.cs index 5a9675161..953bc5a67 100644 --- a/ILSpy.AddIn/Commands/OpenReferenceCommand.cs +++ b/ILSpy.AddIn/Commands/OpenReferenceCommand.cs @@ -13,8 +13,8 @@ namespace ICSharpCode.ILSpy.AddIn.Commands { static OpenReferenceCommand instance; - public OpenReferenceCommand(ILSpyAddInPackage owner, uint id) - : base(owner, id) + public OpenReferenceCommand(ILSpyAddInPackage owner) + : base(owner, PkgCmdIDList.cmdidOpenReferenceInILSpy) { ThreadHelper.ThrowIfNotOnUIThread(); } @@ -98,11 +98,11 @@ namespace ICSharpCode.ILSpy.AddIn.Commands } } - internal static void Register(ILSpyAddInPackage owner, uint id) + internal static void Register(ILSpyAddInPackage owner) { ThreadHelper.ThrowIfNotOnUIThread(); - instance = new OpenReferenceCommand(owner, id); + instance = new OpenReferenceCommand(owner); } } diff --git a/ILSpy.AddIn/ILSpyAddIn.en-US.vsct b/ILSpy.AddIn/ILSpyAddIn.en-US.vsct index e3fc05868..e52c29d25 100644 --- a/ILSpy.AddIn/ILSpyAddIn.en-US.vsct +++ b/ILSpy.AddIn/ILSpyAddIn.en-US.vsct @@ -57,26 +57,6 @@ - - - - - - - -