mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
The File menu's MenuCategory metadata was inherited from the WPF tree and showed two friction points: the four DEBUG diagnostics (Decompile All / Disassemble All / Decompile 100x / Dump PDB) lived in the Open category, so they appeared right after Reload with no visual separator -- the menu read as if Decompile All was a variant of Open; and the assembly-list mutators (Remove with load errors, Clear assembly list, Manage assembly lists) were split across two categories (Remove and Open) even though they all operate on the same object. Reshape into five categories with non-overlapping MenuOrder ranges so category order is deterministic instead of falling out of MEF discovery order: Open (Open, GAC, Reload) MenuOrder 0 .. 9 AssemblyList (Manage, Remove, Clear) MenuOrder 10 .. 19 Save (Save Code, Generate PDB) MenuOrder 20 .. 29 Debug (DEBUG -- ...) MenuOrder 30 .. 39 Exit (Exit) MenuOrder 99999 The "AssemblyList" category replaces the previous "Remove" identifier (carrying Remove-with-load-errors + Clear) since both members and the newly-relocated Manage entry are list-of-assemblies operations rather than pure removal. The category value is a string literal because it is only ever used as a grouping key by ContextMenuProvider / MainMenu.AppendRegistryCommands -- never displayed. Stride-10 within each category gives room to insert later items without renumbering. The earlier 2.5 / 2.55 / 2.6 / 2.7 fractional scheme had no category-boundary contract: the existing 2.6 tie between Remove-with-load-errors and Clear meant their order between each other depended on whatever order reflection enumerated the fields in. Generate portable PDB previously had no MenuOrder at all so its position relative to Save Code was MEF-implementation defined. Assisted-by: Claude:claude-opus-4-7:Claude Codepull/3755/head
3 changed files with 9 additions and 9 deletions
Loading…
Reference in new issue