Solution Browser: Show generic arguments [Option]

Post DPack feature requests here.

Moderator: Sergey

Solution Browser: Show generic arguments [Option]

Postby pikacc » October 26th, 2016, 4:29 pm

Hi, it would be great if you add option to show generic arguments in Solution Browser (and possibly other browsers).

There are some classes which have 1,2 or 3 generic arguments and I have to click each and look at filename in status bar to see if that's the class I want.

It would be great if user could choose from 3 options:
Show as usual (current state): Dictionary
Show number of generic arguments: Dictionary`2
Show "full" generic arguments: Dictionary<TKey, TValue>

Thanks! (Btw, last suggestion I made about sorting by best match works great, good job!)

EDIT:
I've just realized I have same problem with partial classes: there are multiple same entries and I have to check status bar.
Do you have some solution for that?
Maybe optional column "Filename" with just name of the file (no path)?
pikacc
Junior Member
 
Posts: 7
Joined: March 16th, 2012, 12:23 pm

Re: Solution Browser: Show generic arguments [Option]

Postby Sergey » October 28th, 2016, 9:28 am

Could you post a few screenshots illustrating your point please? Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Solution Browser: Show generic arguments [Option]

Postby pikacc » November 21st, 2016, 1:46 pm

Sorry for delay, I though I was subscribed to topic.
See the screenshot in attachment.

First row shows partial class in three different files (Element)
Second row shows three generic classes in three different files (Property)

In both cases, it's necessary to select item in the list and look at the status bar to see if that's what I'm looking for. I guess I could use File Browser instead, but for some reason it orders Property`1 way too low (a lot of files with longer names are above it) and I prefer Solution Browser (better filtering, class/interface/enum icons...).
Attachments
SameNameIssues.png
SameNameIssues.png (121.09 KiB) Viewed 4806 times
pikacc
Junior Member
 
Posts: 7
Joined: March 16th, 2012, 12:23 pm

Re: Solution Browser: Show generic arguments [Option]

Postby Sergey » January 12th, 2017, 12:08 am

Sorry about the delay, it's just scrolled off my radar with holidays and all. I've tested it some more and see what you mean about generic types. Yeah, it's definitely needs some fixing. I'll look into that in scope of VS 2017 work. I'm leaning towards no new option of any kind and simply expanding member name in Solution Browser with generic definition. For instance, given class definition of

class SomeData<T> where T : IData

Solution Browser would display it as SomeData<T> instead of current SomeData. This should be a good start.

Partial classes issue is something I was aware of just am not sure how to address it cleanly. With selection driven by member name, generic members case above there is easier to address as long as differences are reflect in the member name itself. With partial classes, member name is the same but file name is where the difference is. So, it's almost as if you have to look at the status bar to see the difference. I'm open to ideas on how to approach this one.

Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Solution Browser: Show generic arguments [Option]

Postby pikacc » January 12th, 2017, 6:00 am

Thank you for answer, looking forward to SomeData<T> style of display.
Quick idea that comes to mind is to display "difference" of the file name in parenthesis (without file ext). Omitted when it's empty string.

E.g.
Element
Element (Events)
Element (Hierarchy)

The "difference" isn't probably the best word, what I mean is to remove beginning of the filename which all files share. This is how it would look for generated classes in files: Form1.cs, Form1.Designer.cs

E.g.
Form1
Form1 (Designer)

What do you think?
pikacc
Junior Member
 
Posts: 7
Joined: March 16th, 2012, 12:23 pm

Re: Solution Browser: Show generic arguments [Option]

Postby Sergey » January 14th, 2017, 3:54 pm

pikacc wrote:E.g.
Form1
Form1 (Designer)

What do you think?


I like it. I'll roll with that to see how well it works out.

pikacc wrote:Thank you for answer, looking forward to SomeData<T> style of display.


And there is of course VB where it's SomeData(of ISomething) type definition. I might just shorten that to SomeData(of T) or otherwise names gonna get very long fast. No plans on supporting this feature for other languages at the moment though.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: Solution Browser: Show generic arguments [Option]

Postby Sergey » January 16th, 2017, 1:24 am

Generics support was somewhat straightforward to implement, partial classes on the hand wasn't. It breaks a few internal assumptions, which gets tricky to work around. So, I think I'm gonna set partial classes support aside for now. I'd like to continue working on VS 2017 support as that's the bigger issue at the moment. On the bright side - 1 out of 2 is still not bad. Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA


Return to DPack Wish List

Who is online

Users browsing this forum: No registered users and 1 guest

cron