Browse Source

Fix the decompiler text-view context-menu ordering

The right-click menu in the decompiled code read in a near-random order. The
shared entry registry orders entries by a single Order value and only uses
Category to place separators, so a few defects scrambled the result: the
"Decompile" reference entry had Order=10, jumping above Copy/Select all; the
"Decompile to new panel" entry sat in a misspelt "Navigate" category (vs the
"Navigation" the other entries use), adding a stray separator; and it tied
Copy at Order 100 while "Go to token" tied Analyze at 200, interleaving
categories on the discovery-order tiebreak.

Pull the three navigation entries into a contiguous 150-170 band so they form
one block between the Editor (100s) and Analyze (200s) bands, fixing the
spelling so they share a category. No provider change: the existing by-hundreds
category layout is left intact, so the tree / search / metadata menus that share
the registry stay coherent.

Assisted-by: Claude:claude-opus-4-8:Claude Code
pull/3816/head
Siegfried Pammer 2 weeks ago committed by Siegfried Pammer
parent
commit
5253351ce0
  1. 4
      ILSpy/Commands/DecompileInNewViewCommand.cs
  2. 2
      ILSpy/Commands/DecompileReferenceContextMenuEntry.cs
  3. 2
      ILSpy/Commands/ShowInMetadataContextMenuEntry.cs

4
ILSpy/Commands/DecompileInNewViewCommand.cs

@ -36,10 +36,10 @@ namespace ICSharpCode.ILSpy.Commands @@ -36,10 +36,10 @@ namespace ICSharpCode.ILSpy.Commands
/// </summary>
[ExportContextMenuEntry(
Header = nameof(Resources.DecompileToNewPanel),
Category = "Navigate",
Category = "Navigation",
Icon = "Images/ViewCode",
InputGestureText = "MMB",
Order = 100)]
Order = 160)]
[Shared]
internal sealed class DecompileInNewViewCommand : IContextMenuEntry
{

2
ILSpy/Commands/DecompileReferenceContextMenuEntry.cs

@ -29,7 +29,7 @@ namespace ICSharpCode.ILSpy.Commands @@ -29,7 +29,7 @@ namespace ICSharpCode.ILSpy.Commands
/// of clicking the hyperlink. Visible only when the click landed on a reference that resolves to
/// an <see cref="IEntity"/>.
/// </summary>
[ExportContextMenuEntry(Header = nameof(Resources.Decompile), Category = "Navigation", Order = 10)]
[ExportContextMenuEntry(Header = nameof(Resources.Decompile), Category = "Navigation", Order = 150)]
[Shared]
public sealed class DecompileReferenceContextMenuEntry : IContextMenuEntry
{

2
ILSpy/Commands/ShowInMetadataContextMenuEntry.cs

@ -33,7 +33,7 @@ namespace ICSharpCode.ILSpy.Commands @@ -33,7 +33,7 @@ namespace ICSharpCode.ILSpy.Commands
/// <see cref="IEntity"/> backed by a real metadata file; firing it routes through the
/// dock workspace to open the matching CLI metadata table at the entity's row.
/// </summary>
[ExportContextMenuEntry(Header = nameof(Resources.GoToToken), Category = "Navigation", Order = 200)]
[ExportContextMenuEntry(Header = nameof(Resources.GoToToken), Category = "Navigation", Order = 170)]
[Shared]
public sealed class ShowInMetadataContextMenuEntry : IContextMenuEntry
{

Loading…
Cancel
Save