Browse Source

Move commands for opening panes to `Window` menu and add commands for the "Assemblies" and "Analyzer" panes.

While the command isn't really necessary to open these panes ("Assemblies" is always open and "Analyzer" opens automatically when analyzing), it is useful to focus these panes without having to use the mouse.
pull/2494/head
Daniel Grunwald 4 years ago
parent
commit
733029bbb7
  1. 18
      ILSpy/Commands/ShowDebugSteps.cs
  2. 35
      ILSpy/Commands/ShowPane.cs
  3. 2
      ILSpy/ILSpy.csproj
  4. 18
      ILSpy/Properties/Resources.Designer.cs
  5. 6
      ILSpy/Properties/Resources.resx
  6. 2
      ILSpy/Search/SearchPane.cs

18
ILSpy/Commands/ShowDebugSteps.cs

@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
#if DEBUG
using ICSharpCode.ILSpy.Docking;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.ViewModels;
namespace ICSharpCode.ILSpy.Commands
{
[ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources._ShowDebugSteps), MenuOrder = 5000)]
class ShowDebugSteps : SimpleCommand
{
public override void Execute(object parameter)
{
DockWorkspace.Instance.ShowToolPane(DebugStepsPaneModel.PaneContentId);
}
}
}
#endif

35
ILSpy/Commands/ShowPane.cs

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
using ICSharpCode.ILSpy.Docking;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.ViewModels;
namespace ICSharpCode.ILSpy.Commands
{
[ExportMainMenuCommand(Menu = nameof(Resources._Window), Header = nameof(Resources._Assemblies), MenuCategory = "pane", MenuOrder = 5000)]
class ShowAssemblies : SimpleCommand
{
public override void Execute(object parameter)
{
DockWorkspace.Instance.ShowToolPane(AssemblyListPaneModel.PaneContentId);
}
}
[ExportMainMenuCommand(Menu = nameof(Resources._Window), Header = nameof(Resources._Analyzer), MenuCategory = "pane", MenuOrder = 5000)]
class ShowAnalyzer : SimpleCommand
{
public override void Execute(object parameter)
{
DockWorkspace.Instance.ShowToolPane(AnalyzerPaneModel.PaneContentId);
}
}
#if DEBUG
[ExportMainMenuCommand(Menu = nameof(Resources._Window), Header = nameof(Resources._ShowDebugSteps), MenuCategory = "pane", MenuOrder = 5000)]
class ShowDebugSteps : SimpleCommand
{
public override void Execute(object parameter)
{
DockWorkspace.Instance.ShowToolPane(DebugStepsPaneModel.PaneContentId);
}
}
#endif
}

2
ILSpy/ILSpy.csproj

@ -132,6 +132,6 @@ @@ -132,6 +132,6 @@
<Target Name="ApplyStackExtension" AfterTargets="PostBuildEvent">
<Exec Condition="'$(VCToolsVersion)'!=''" Command="&quot;$(VCBasePath)Tools\MSVC\$(VCToolsVersion)\bin\Hostx64\x64\editbin.exe&quot; /stack:16777216 &quot;$(TargetPath)&quot;&#xD;&#xA;EXIT 0" />
<Exec Command="&quot;$(TargetFrameworkSDKToolsDirectory)sn.exe&quot; -R &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\ICSharpCode.Decompiler\ICSharpCode.Decompiler.snk&quot;" />
<Exec Command="&quot;$(TargetFrameworkSDKToolsDirectory)sn.exe&quot; -R &quot;$(TargetPath)&quot; &quot;$(AssemblyOriginatorKeyFile)&quot;" />
</Target>
</Project>

18
ILSpy/Properties/Resources.Designer.cs generated

@ -78,6 +78,24 @@ namespace ICSharpCode.ILSpy.Properties { @@ -78,6 +78,24 @@ namespace ICSharpCode.ILSpy.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Analy_zer.
/// </summary>
public static string _Analyzer {
get {
return ResourceManager.GetString("_Analyzer", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to _Assemblies.
/// </summary>
public static string _Assemblies {
get {
return ResourceManager.GetString("_Assemblies", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to _Check for Updates.
/// </summary>

6
ILSpy/Properties/Resources.resx

@ -933,6 +933,12 @@ Do you want to continue?</value> @@ -933,6 +933,12 @@ Do you want to continue?</value>
<data name="_AddMainList" xml:space="preserve">
<value>_Add To Main List</value>
</data>
<data name="_Analyzer" xml:space="preserve">
<value>Analy_zer</value>
</data>
<data name="_Assemblies" xml:space="preserve">
<value>_Assemblies</value>
</data>
<data name="_CheckUpdates" xml:space="preserve">
<value>_Check for Updates</value>
</data>

2
ILSpy/Search/SearchPane.cs

@ -397,7 +397,7 @@ namespace ICSharpCode.ILSpy @@ -397,7 +397,7 @@ namespace ICSharpCode.ILSpy
}
}
[ExportMainMenuCommand(Menu = nameof(Properties.Resources._View), Header = nameof(Properties.Resources.Search), MenuIcon = "Images/Search", MenuCategory = nameof(Properties.Resources.View), MenuOrder = 100)]
[ExportMainMenuCommand(Menu = nameof(Properties.Resources._Window), Header = nameof(Properties.Resources.Search), MenuIcon = "Images/Search", MenuCategory = "pane", MenuOrder = 100)]
[ExportToolbarCommand(ToolTip = nameof(Properties.Resources.SearchCtrlShiftFOrCtrlE), ToolbarIcon = "Images/Search", ToolbarCategory = nameof(Properties.Resources.View), ToolbarOrder = 100)]
sealed class ShowSearchCommand : CommandWrapper
{

Loading…
Cancel
Save