Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Suggestion improvements

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Uniwares Posted - Sep 03 2020 : 04:35:25 AM
I realized that the suggestions that VA makes, many times are "guesses" and not based on what I usually do. The best example are class members of type DateTime.
I can write 10 times "this.CurrentTime = " and 10 times VA will suggest "new DateTime" although 9 out of 10 times what I write there is "DateTime.Now". A little bit of selection counting could resolve that.

So I would expect that VA get smart over time and starts suggesting what I really want.
And now this brings me to a an smaller issues with the suggestions: they never include static members that fit the bill (like DateTime.Now) Not sure if that is a bug or just an oversight. In the case of DateTime, VA only offers "new DateTime" and "null"
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 04 2020 : 1:56:37 PM
I have put in a feature request to see if we can pull up the list of "likely" entries the IDE has, and add these to the listbox:

case=142841

it depends on how available, if it is available at all, this information is from the IDE. Worth seeing what our developers make of it.

For now, at least the snippets let you address the main cases you keep running into.
Uniwares Posted - Sep 04 2020 : 11:28:15 AM
Hahaha, yeah, you are right actually. Still, would be nice to have the popular ones showing up. Like current intellisense actually does. But then again, I guess they have more statistical data available.
feline Posted - Sep 04 2020 : 11:24:28 AM
Are you sure you really want all static methods? Going to the class declaration for DateTime in C# in VS2019, there are 33 different static methods for this class. I didn't check the interfaces it inherits, but I doubt you want all of these coming up as standard suggestions. We have 9 overloaded operators for example, which aren't something you normally want in the listbox.

Other classes may well have even more static members.
Uniwares Posted - Sep 04 2020 : 06:10:18 AM
Snippet works fine for DateTime.Now, yet its not the perfect solution. Having all static methods included in the suggestions would be.
feline Posted - Sep 03 2020 : 07:39:33 AM
Normal suggestions are designed to be aware of how often you have typed something, and to respond. The down side is that they are not so "clever" or context aware.

Here you are seeing a Smart Suggestion, which are designed to be type specific, but by default they only offer basic options. You can add a snippet to extend the options suggested, on a type by type basis, so in this case, open your VA Snippet editor and paste in the following XML to add a smart suggestion entry for the C# DateTime type, adding the Now method:

<VA_Snippet>
<Language>C#</Language>
<Title>SuggestionsForType DateTime</Title>
<Shortcut />
<Description />
<Code>DateTime.Now</Code>
</VA_Snippet>


This will take effect as soon as you accept the new snippet.

This is listed in the documentation, but I am not sure how many people realise you can do this:

https://support.wholetomato.com/default.asp?W172

© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000