ILSpy
ILSpy copied to clipboard
add "Referenced Types" under References
Problem
Seeing the types/members referenced in an assembly reference is cumbersome.
Solution
Add a "Referenced Types" child node to each reference which contains the referenced types, including exported/forwarded types.
Future enhancements:
- C#-ify the names
- other children eg. ManifestResource
partially fixes https://github.com/icsharpcode/ILSpy/issues/2690. It looked like trying to add "analysis" for anything that's not IEntity
was going to be a bad time.
Thank you for proposing this feature! It definitely looks interesting, some notes/comments from my side:
- I am currently working on #3068 which will most likely require some refactoring in ILSpy's tree nodes, which will conflict with this feature. Until the refactoring is done, I won't be able to merge this.
- The icon for exported types looks really strange, maybe we can come up with some better symbol.
- I don't think any tree nodes should print their signature info in the tooltip, I'd prefer to do the same as we do for all other tree nodes of type definitions and members.
- The tree node label (i.e., Text property) should use the appropriate methods of the currently selected Language implementation.
Thank you for proposing this feature! It definitely looks interesting, some notes/comments from my side:
:)
I am currently working on Support reading raw metadata blobs and Portable PDBs #3068 which will most likely require some refactoring in ILSpy's tree nodes, which will conflict with this feature. Until the refactoring is done, I won't be able to merge this.
Sure.
The icon for exported types looks really strange, maybe we can come up with some better symbol.
Yeah. Maybe something like the "Type" icon with a "Shortcut" overlay? (not that I know how to implement that)
I don't think any tree nodes should print their signature info in the tooltip, I'd prefer to do the same as we do for all other tree nodes of type definitions and members.
I'm not 100% sure what you mean here, but I'll try to figure it out the next time I have a chance.
The tree node label (i.e., Text property) should use the appropriate methods of the currently selected Language implementation.
Do you mean completing the TODO inside CSharpLanguage::GetEntityName
, or using a different method?
@fowl2 if you don't mind, I will be taking your branch and add the missing things, clean it up, etc. and push my changes here for further discussion...
@siegfriedpammer sure, any way I can be help.
Have been looking into wether it would make sense to have an implementation of IMember
, possibly unified with FakeMember
etc. to get the correct language specific formatting and possibly the analysis features working, but I'm still thinking through any "fuzziness" with mismatches, etc.
Note: looking at the code, it seems it does not support showing nested type references.
One problem with getting nice member signatures in the tree view is that we probably want to show all members even those from assemblies that are not resolvable. So probably Language.GetEntityName
based on SRM is the best we can do, without creating yet another layer doing similar things.
Thank you for proposing and implementing this feature. Sorry that it took so long to get this merged.