-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider showing 'abstract' in quick info for abstract classes #5739
Comments
This would definitely be useful. +1 |
The question is what set of modifiers to show? what about static? What about readonly for fields? what about accessibility (already in the glyph we show), etc. |
Marking up for grabs, but if someone wants to pick this up, let's talk about what we want in more detail. |
I actually think all of those should be visible. |
In that case custom attributes should be shown as well #711. They can materially affect the behavior of the class and thus are as important to show as standard attributes. |
And what if you're looking at a type like CSharpPackage? Do you want to see all those attributes in QuickInfo? That's why I don't think this is a simple thing to "just do". |
@Pilchie Yes, I want to see them:
// TODO(DustinCa): Put all of this in CSharpPackageRegistration.pkgdef rather than using attributes
|
I think i'd rather have quick-info just peek at the original source code. It seems like we've got an interesting way of really thinking about things in the context of how the features were implemented in VS 20+ years ago :) Show me the original code, in some beautiful, easy to read, manner, and then we don't really have to worry about what 'QuickInfo' looks like at all :) |
I prefer executive summary.
Yeah, showing text files slightly different ways.
This implies that the code is available and open-source or you are comfortable with the legal implications of decompiling on the fly (the way ReSharper does it). |
We already do this. It's how Metadata-as-source works. |
@CyrusNajmabadi Who is "we" and how is this relevant for me not willing to decompile someone's proprietary algorithm just because I want to quickly and reliably see if a method is marked with certain attributes? |
Roslyn/C#-ide/VB-ide. This feature already exists. It has existed since VS2005 I believe.
We already have to read in metadata in the first place to show you anything in QuickInfo. That's how we can tell you the name, type of symbol, and all the other information we show. I'm just saying we can consider unifying our two experiences around showing symbol information (i.e. Peek and QuickInfo). Instead of having two entirely separate features, we could try to land on just one. |
@CyrusNajmabadi I did not realise you are in the team. I now also understand there is a difference between reconstructing partial code from metadata and decompiling full code.
That could be interesting, but it would not show e.g. all inherited attributes, just the current ones. It would be nice to scan the whole hierarchy (if present) to show the metadata. I also dislike having to press anything, hovering over for a tooltip is ideal for me. |
True. Though this is a problem today as well. But with a 'peek-like' view, you would ideally be able to walk up the inheritance hierarchy easily.
Agreed. I'd still utilize the 'hover' concept. I'm just saying that we could consider using an actual view of the source (or Metadata-as-source), instead of the presentation that Quick-Info currently utilizes. |
I personally like the way this plug-in does it - lots of options configurable to everyone's taste: |
To be honest I often overlook the icon, maybe I have some difficult distinguishing different kinds of them. I understand that icons are used to save some space, but it would be nice to add some text overlay to the icon, however it's too small. |
@DiryBoy There is no universal graphical symbol for "abstract" or "class" or "abstract class". It's a hard problem even with more concrete concepts: http://ux.stackexchange.com/questions/1795/when-to-use-icons-vs-icons-with-text-vs-just-text-links Luckily ReSharper and ET come to rescue: |
@dsaf I do see an |
Why is this information useful? How does it change your behavior knowing that it's abstract? |
Hey @AnthonyDGreen, it's useful to quickly understand the sort of contracts that are in place for a codebase. It also could help users from accidentally going to the definition of an abstract method (which tends to be slightly frustrating) when you're dealing with the usage for an abstract class. |
Moving to small-fixes if someone wants to take this on. |
See microsoft/TypeScript#4610.
The text was updated successfully, but these errors were encountered: