mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
The avalonia branch only carried the base set of tree-node icons.
FieldReadOnly, EnumValue, Indexer, VirtualMethod, ExtensionMethod and
PInvokeMethod were already SVGs in master:ILSpy/Images/ but never
copied over -- so e.g. readonly fields shared the same glyph as
mutable instance fields, and indexers were indistinguishable from
plain properties.
Bring across the seven SVGs (those six plus Copy for the Copy-
fully-qualified-name context-menu entry), register them on
Images.cs, and extend the icon dispatch in each tree node to mirror
WPF's logic:
FieldTreeNode EnumValue / Literal (const) / FieldReadOnly / Field
PropertyTreeNode Indexer / Property, with the C# 14 Extension overlay
when the accessor is an extension member
MethodTreeNode Operator / extension Method / Constructor / PInvoke
(extern + DllImport, no body) / VirtualMethod /
Method
PInvoke detection uses the documented (!HasBody && DllImport) pair
so managed wrappers that re-apply the attribute via forwarding don't
inherit the native-call glyph.
Also wire the Copy icon onto the "Copy fully qualified name" entry
so the menu row matches its WPF counterpart.
Assisted-by: Claude:claude-opus-4-7:Claude Code
pull/3755/head
12 changed files with 309 additions and 20 deletions
Loading…
Reference in new issue