Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Autocompletion overriding my manually typed choice
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

scottbilas
Ketchup Master

72 Posts

Posted - Apr 02 2010 :  12:04:42 PM  Show Profile  Reply with Quote
I've been running into this problem a lot and finally nailed down a solid repro case. This is with 1814 in VS2008.

The problem is that I type in a symbol fully yet because an autocompletion dropdown came down, and had something else selected, it chooses that when I hit Space and overrides what I typed in.

Repro:

1. Create a new WPF project.
2. Add a new class with this as its contents:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;

namespace WpfApplication3
{
	class Class1 : Panel
	{
		void Blah()
		{

		}
	}
}


3. In the Blah() function type "va"
4. This should bring up a dropdown that has ValidateValueCallback at its top.
5. Type 'r' then hit Space immediately after

What happens is that what should be "var" ends up as "ValidateValueCallback".

This only happens if you pause after typing the "va" just long enough to let the dropdown happen. As I type this happens to me all the time.

What should happen instead is that VAX should recognize that "var" is a keyword and err on the side of not messing up my code, unless I specifically arrow-down to select something else.

Edited by - scottbilas on Apr 02 2010 12:13:15 PM

scottbilas
Ketchup Master

72 Posts

Posted - Apr 02 2010 :  12:37:32 PM  Show Profile  Reply with Quote
This happens in an even worse situation, where it has nothing to do with how fast I'm typing.

I attached a screen shot. As soon as I hit Space it replaces 'select' with SelectionChangedEventArgs. This is wrong for two big reasons:

1. select is a valid keyword

2. It makes no sense in the given context in the linq query to have any of those listed in the dropdown box. The linq grammar is fairly simple and there are few keywords permitted in this spot in the expression.

#1 is the big problem. #2 would be a nice to have to fix.

I am finding with VAX lately that it's doing this kind of thing in many situations and I frequently have to hit ESC every other symbol that I type to make the autocompletion box go away.




Go to Top of Page

scottbilas
Ketchup Master

72 Posts

Posted - Apr 02 2010 :  12:44:42 PM  Show Profile  Reply with Quote
Oops - in my second example above it is not valid code. The only thing that can go after tvm.Parent is 'into', so typing 'select' isn't valid.

Regardless - what should go into that listbox? Not a bunch of types..just 'into', right?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 06 2010 :  2:08:32 PM  Show Profile  Reply with Quote
For the first code sample I am seeing the same problem, thank you for the very clear description. For me turning Off the new VA option:

VA Options -> Advanced -> Suggestions -> Filter completion lists to use VA's Suggestions in C#, VB,...

helps quite a lot. With this option turned on the listbox is being filtered down so you are only seeing VA's suggestions, but VA is only suggesting a few symbol names that it knows and thinks you might be after. As a result suggestions can be very good at sometimes, and not so good at other times.

Does turning off this option also help with the second problem you are seeing?

zen is the art of being at one with the two'ness
Go to Top of Page

scottbilas
Ketchup Master

72 Posts

Posted - Apr 13 2010 :  5:36:12 PM  Show Profile  Reply with Quote
Yes, disabling that option fixes the issue. That new option sure seems to cause a lot of problems. :)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 15 2010 :  3:34:49 PM  Show Profile  Reply with Quote
I am not quite sure what to say here. VA seems to be behaving as expected in this situation.

VA suggestions are just a limited set of "best guesses", that are based on situation, typing history, etc. But since this is just a guess it can never be 100% perfect. The idea is to give you a small number of focussed suggestions, not a list of all possible symbols and keywords.

zen is the art of being at one with the two'ness
Go to Top of Page

scottbilas
Ketchup Master

72 Posts

Posted - Apr 15 2010 :  4:00:13 PM  Show Profile  Reply with Quote
My original problem was less about the contents of the listbox than it was about the bad behavior. If I type "va" then hit "r" then space quickly, I didn't get "var", but instead something entirely different. I'd expect that if what I type exactly matches something in the box, it will get preferred over any of the other items in the auto completion.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 16 2010 :  6:24:46 PM  Show Profile  Reply with Quote
This registry key setting might interest you:

http://docs.wholetomato.com?W357

But when I tested and reproduced this I was seeing a list of VA suggestions that did not include "var". Are you actually seeing a reliable listbox appear with "var" that is then "lost" and replaced with a different listbox without "var" in it when you type the "r" at the end of "var"?

zen is the art of being at one with the two'ness
Go to Top of Page

scottbilas
Ketchup Master

72 Posts

Posted - Apr 17 2010 :  1:36:20 PM  Show Profile  Reply with Quote
I'm no longer able to reproduce the issue, though I recently upgraded to a much faster computer. Could have something to do with it. But I am seeing 'var' when I type V regardless of any settings in the Vassist suggestion options (which is what I'd expect, given that it's a keyword not a symbol). I'll post back if I run into the issue again.
Go to Top of Page

scottbilas
Ketchup Master

72 Posts

Posted - Apr 21 2010 :  7:55:02 PM  Show Profile  Reply with Quote
This is still happening in VS2010 with the latest build. I can't pin down exactly what the repro is, but it is happening often as I'm typing quickly.

For example, just now I typed '= null;' and VAssist turned that into '= namespace;'. But if I undo it and type in the exact same thing again, it doesn't do it. Seems to only happen one time.

I've gotten this to happen with other keywords as well.

In my Suggestions options, I only have "Include suggestions in listboxes" checked. Not that it should matter - if I'm typing in a keyword and I hit ; it should not replace that keyword with anything else.
Go to Top of Page

scottbilas
Ketchup Master

72 Posts

Posted - Apr 21 2010 :  11:14:31 PM  Show Profile  Reply with Quote
I'm using my laptop which is a much slower machine (though still fast) and it's happening a lot more often here (my VAssist settings and the rest of my environment are the same btw).

I have a pretty good repro case I think.

I'm typing this:

foreach (var item in

It's all around the "in". First time I typed it I got "if". If I backspace twice then type "in" again I get "if" again. This happens a few times, then the "in" sticks. So then I switch to trying to type "if" and it keeps replacing it with "in". One time I got "namespace". Note that it's important to type fast and hit space immediately after the keyword. If you pause before hitting space, it will not repro.

Here's my guess as to what is going on. When I type that first "i" the autocomplete dialog starts to spin up. First thing that matches is the most recently used word that starts with "i". Yet when I type the second letter and then space quickly, it skips over the second match to find the correct keyword, and considers the space to be the "accept this" command.

This is one of the most frustrating things about VAssist for me right now. I am constantly having to undo things or pause and wait for something to finish, or hit ESC to make something go away. It's making me question how much productivity gain I'm getting from VAssist, honestly (and I've been using this product since the late 90's).
Go to Top of Page

scottbilas
Ketchup Master

72 Posts

Posted - Apr 22 2010 :  2:52:32 PM  Show Profile  Reply with Quote
Another incidence: typing "public string " ended up as "public sbyte ". I don't think I've ever even used an sbyte in this setup so it's weird that this would take precedence over string, which I use all the time.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 23 2010 :  4:18:20 PM  Show Profile  Reply with Quote
Do you have:

IDE tools menu -> Options -> Text Editor -> C# -> IntelliSense -> Committed by pressing the space bar

turned On or Off? I am wondering if turning this off will help.

zen is the art of being at one with the two'ness
Go to Top of Page

scottbilas
Ketchup Master

72 Posts

Posted - Apr 27 2010 :  3:58:37 PM  Show Profile  Reply with Quote
This does help with the problem, yes.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Apr 28 2010 :  11:53:11 AM  Show Profile  Reply with Quote
Does this fix the problem, or are you still seeing the problem at times?

zen is the art of being at one with the two'ness
Go to Top of Page

scottbilas
Ketchup Master

72 Posts

Posted - Apr 28 2010 :  1:24:56 PM  Show Profile  Reply with Quote
Well, it masks the problem. Because 'space' no longer brings up the dialog, there's no longer an issue with me typing too fast and ending up with 'in' instead of 'if' or any of the other examples I gave.

Autocompletion happens for me with '.' and 'tab'. In either case I am a lot more deliberate in choosing something from the box, which slows down enough that there is time for the completion box to react.

So I believe the problem is still there, I just no longer see it.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - May 06 2010 :  9:52:03 PM  Show Profile  Reply with Quote
We opened case=43501 for this report.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - May 10 2010 :  9:02:04 PM  Show Profile  Reply with Quote
case=43501 is fixed in build 1823

Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000