diff --git a/Helpers/SolutionHelper.cs b/Helpers/SolutionHelper.cs index f413a5c..75324a0 100644 --- a/Helpers/SolutionHelper.cs +++ b/Helpers/SolutionHelper.cs @@ -62,25 +62,6 @@ public static VCProjectWrapper GetProjectOfSelection(VCFileUtilsPackage package) return projects[0]; } - public static string GetDirectoryOfSelection(VCFileUtilsPackage package) - { - var directories = GetSelectedItems(package) - .Where(item => item.FullPath != null) - .Select(item => (item is VCFilterWrapper) ? item.FullPath : Path.GetDirectoryName(item.FullPath)) - .ToList(); - - if (directories.Count() == 0) - return null; - - if (directories.Any(dir => dir != directories[0])) - return null; - - if (!Directory.Exists(directories[0])) - return null; - - return directories[0]; - } - public static string GetSelectedDirectory(VCFileUtilsPackage package) { var selection = GetSelectedItems(package) diff --git a/Integration/Commands/ShowInExplorerCommand.cs b/Integration/Commands/ShowInExplorerCommand.cs deleted file mode 100644 index cca8f67..0000000 --- a/Integration/Commands/ShowInExplorerCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.Design; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using VCFileUtils.Helpers; -using VCFileUtils.Model; - -namespace VCFileUtils.Integration.Commands -{ - class ShowInExplorerCommand : BaseCommand - { - public ShowInExplorerCommand(VCFileUtilsPackage package) - : base(package, new CommandID(GuidList.GuidVCFileUtilsCommandSet, (int)PkgCmdIDList.CmdIDShowInExplorer)) - { - - } - - protected override void OnBeforeQueryStatus() - { - Visible = SolutionHelper.GetSelectedItems(Package).Any(); - Enabled = SolutionHelper.GetDirectoryOfSelection(Package) != null; - } - - protected override void OnExecute() - { - Process.Start("explorer.exe", SolutionHelper.GetDirectoryOfSelection(Package)); - } - } -} diff --git a/Integration/PkgCmdIDList.cs b/Integration/PkgCmdIDList.cs index 2211b8b..da1a9e8 100644 --- a/Integration/PkgCmdIDList.cs +++ b/Integration/PkgCmdIDList.cs @@ -4,7 +4,6 @@ public static class PkgCmdIDList { public const uint CmdIDSetProjectRoot = 0x2000; public const uint CmdIDOrganizeFiles = 0x2010; - public const uint CmdIDShowInExplorer = 0x2020; public const uint CmdIDRemoveEmptyFilters = 0x2030; public const uint CmdIDReAddFiles = 0x2040; } diff --git a/VCFileUtils.csproj b/VCFileUtils.csproj index 9ccbc25..c94b369 100644 --- a/VCFileUtils.csproj +++ b/VCFileUtils.csproj @@ -74,7 +74,6 @@ - diff --git a/VCFileUtilsPackage.cs b/VCFileUtilsPackage.cs index dcdf690..3175897 100644 --- a/VCFileUtilsPackage.cs +++ b/VCFileUtilsPackage.cs @@ -82,7 +82,6 @@ private void RegisterCommands() { menuCommandService.AddCommand(new OrganizeFilesCommand(this)); menuCommandService.AddCommand(new SetProjectRootCommand(this)); - menuCommandService.AddCommand(new ShowInExplorerCommand(this)); menuCommandService.AddCommand(new RemoveEmptyFiltersCommand(this)); menuCommandService.AddCommand(new ReAddFilesCommand(this)); } diff --git a/VCFileUtilsPackage.vsct b/VCFileUtilsPackage.vsct index 96a9590..0d89408 100644 --- a/VCFileUtilsPackage.vsct +++ b/VCFileUtilsPackage.vsct @@ -25,14 +25,6 @@ - - -