Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Suggestions do not appear - VS2005 C#

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
krk Posted - Oct 02 2006 : 6:24:49 PM
This happens in C# editor.

I type VAX autotext shortcuts and all I get is Microsoft suggestions.
No suggestions from VA appear unless I do the following:

1. Type the full shortcut - MS intellisense suggestions appear
2. Delete the last letter of the shortcut - all suggestions dissappear
3. Re-type the last letter of the shortcut - only VAX shortcut appears

This is quite annoying as it renders VAX virtually useless.
Is there anything I can do?

My version of VAX and Visual Studio:

VA_X.dll file version 10.3.1534.0 built 2006.09.02
VAOpsWin.dll version 1.3.3.6
VATE.dll version 1.0.5.8
DevEnv.exe version 8.0.50727.42
msenv.dll version 8.0.50727.42
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.2900.2180
Windows XP 5.1 Build 2600 Service Pack 2
2 processors

Platform: Win32
Stable Includes:
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include;
C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\include;

Library Includes:
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfcm;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl;
C:\\Program Files\\Microsoft Visual Studio 8\\VC\\crt\\src;


17   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 10 2006 : 09:12:16 AM
*ah* this makes sense. now if this was some of my recent code then the suggestion would almost certainly be correct. i have been doing a lot of string parsing / checking code recently, where i typically run several tests in a row on a single variable.

in this very specific case it makes sense that you do not want to see m_sText, but what if you were about to assign something to m_sText?

in my code i use a form of Hungarian notation, as you are doing here in this snippet. type m, press the shift key and the understore is inserted:

VA Options -> Text Editor -> C/C++ -> insert _ after m and shift

and type one letter 'l' perhaps and suddenly you should get far more sensible suggestions. it does take some time to learn to get the most out of VA it is situations like this that encourage me to keep to my preferred naming conventions, since they help VA to work out what i am typing.

thinking about suggestions, have you ever had problems with suggestions appearing after "new"?
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5420
gbozoki Posted - Oct 09 2006 : 7:06:04 PM
feline,

Thank you very much for your reply, I'll see if setting that registry flag helps. I'll also install 3538 and see what happens.

I also thought about how I'd expect suggestions to work. I realize that this may be very different from how it works now and may even be the opposite of what others would expect, but it may help in future versions.

Consider this code snippet (C#):


public class MyClass
{
    private string m_sText;
    private int m_lValue;
    // some other private members here

    ...

    public void DoSomething ()
    {
        if ( m_sText.Length > 0 )
            DoSomethingElse ();

        // caret is after '_'; suggestion list
        // contains m_sText
        if ( m_ )
    }
}


If I start typing the 2nd if block, I get a suggestion list that will include m_sText, since that's what I used recently in the code. However, in this case, I wouldn't want to see m_sText, since I just wrote code to deal with that variable - I'd expect all other members of the class as suggestion, *except* m_sText.

I guess, this is what makes suggestion lists unintuitive for me: it uses the past to suggest a symbol in the code I'm currently writing, but I rarely need that suggested symbol, since it is (in many cases) already dealt with (in past code.)

I hope this is clear enough to give you an idea about my problem, although I understand that reading my mind while I'm typing may not be implemented until VAX v11. :)
feline Posted - Oct 09 2006 : 2:55:12 PM
if you want to give suggestions another try, and you are using VA 1538 then look for the registry key:

HKCU \\ Software \\ Whole Tomato \\ Visual Assist X \\ VANet8 \\ SuggestionSelect = 1

1 is the default behaviour, where suggestions are only highlighted some of the time, 2 tells VA to always highlight them. replace "VANet8" with the correct string if you are not using VS2005.

the private member variable, this is the down side of suggestions. they can and do suggest "odd" things, i have seen them suggest ", " (comma followed by space) since that is a code snippet I was re-using at the time.

the suggestions are not tied to a rigorous parser and understanding of language syntax, instead it is much more "you keep on typing m_fred, so I will suggest it".

having said all of this, clearly something is going on here, but the problem is finding out what. I have done some C# development, but most of my work is still in C++, so I do not have a lot of personal experience to draw on here. when I have done work in C# I have been quite happy with VA's suggestions, but I am used to how they work.

there are occasional reports of problems with correct case and listboxes (of some type) in C#, but most of them are nearly impossible to reproduce or pin down, so you could be running into one of these cases.

next time you see a suggestion that seems wrong can you stop and think about it for a moment? what makes it seem "odd" or "wrong", and can you see any sort of logic to its presence?
gbozoki Posted - Oct 09 2006 : 1:55:54 PM
feline,

Thanks for the replies - I agree with jag that it's hard to really describe why I think the suggestions don't work really well.

It may be simply because I rarely get a selected item in the suggestion list (though sometimes there is a selection), so I always end up typing it. I admit that I took up the habit of not looking it through when this happens, since it's normally faster to type in the symbol than go through the list and see if it's there. Eventually, I ended up turning off suggestion lists, because I feel that the results are very unintuitive (I mostly expect different items in the list than what actually appear.)

I'm not sure if it's a problem or I just made a mistake, but at one point in the code for a derived class I typed the name of a private member of the base class, for which I got a list of suggestions, which seems weird: private base members are cannot be accessed from derived classes, so they shouldn't be suggested. In this case, the suggestion list cannot be converted to a completion list (which is understandable.)

I started wondering if the problem with selected items in suggestion lists has anything to do with typing the wrong symbol name, like in the example above.
feline Posted - Oct 09 2006 : 06:51:03 AM
Suggestions work very well when you are re-using the same variables or functions. This tends to happen when writing longer functions, or working on a particular part of a program.

Opening up a new project is the exact opposite of this, since VA has no "history" to work from, so it has no idea what variables you are using, so it will not know to suggest them.

When working in one small area of a large C++ solution I can go for hours without ever seeing a completion listbox, since VA's suggestions are nearly always correct, once I have typed a few letters. This is a fairly extreme case but it shows the potential is there.
jag Posted - Oct 08 2006 : 7:10:26 PM
Thanks for the response.

I remember playing with acronyms in some previous version of VA with C++ and it worked well. I'm only running a trial, and now with c#, but it's not the first time I tried your software out and I'm a bit familiar with its [old] features.

On the subject, it's a bit hard to explain why the suggestion listbox isn't being very helpful, but maybe you could open up a simple project with a gridview and with extra classes to verify it's working the way it should. With c# you don't have the global namespace mess to deal with, that's why I thought more suggestions were easier to find.
support Posted - Oct 08 2006 : 11:56:48 AM
If you haven't typed gvActions recently or it's not referenced in nearby code, VA X is unlikely to suggest it. Hence, "playing around" with suggestions often makes them not work as you expect.

Press Ctrl+Space to convert a suggestion list to the default list of all completions.

Try enabling acronyms in the VA X options dialog and typing "gar" to get gvActions_RowDataBound. Use of acronyms takes some change in brain cells but it works really well.

Enable shorthand once you've master acronyms.

http://www.wholetomato.com/products/features/acronym.asp
jag Posted - Oct 07 2006 : 5:17:24 PM
hmmmm.
I was under the impression that VAX was trying to guess what I was typing so I only played around with the "Guess content when unknown" option.

But yes, the valid options appear in the completion listbox.
It's even able to "guess" which option I want while narrowing down the list while typing.

I guess I was expecting the suggestion listbox to give about the same options as the completion one while keeping its distinct behaviour. The way it works atm is just too limiting to make it useful, though... It never suggests "gvActions" and seems to prefer the event handlers like "gvActions_RowDataBound" or others that I've defined.
feline Posted - Oct 07 2006 : 1:18:56 PM
the idea behind the suggestion listbox is to offer the "correct" (best guess) option as you type, which is different to completion listboxes, which are designed to offer all options.

personally I find the suggestions are normally very accurate, and save me a LOT of typing. typing more letters can change, and refine the suggestions. I do most of my work in C++, so that may make a difference. sometimes they are just wrong, but overall I find them invaluable.

if you find the suggestions simply get in the way and are not helping then you can turn them off via:

VA Options -> Text Editor -> suggestions

if there are no matches in the completion listbox then it is unlikely VA could offer a valid suggestion. or am I missing something here?
jag Posted - Oct 06 2006 : 07:47:41 AM
feline:
I also have the problem reported by gbozoki, and registered to post to confirm it and give any additional explanation you may need.

The thing is, VAX's guesses get in the way of valid input. For example:
I have an object called gvAction, but when I type "gvA" it tries to guess that I want to type "gvActions_RowDataBound". Both "gvActions" and "gvActions_RowDataBound" appear in the completion listboxes.

The suggestion lists should appear if there are no matches in the completion list, right? Otherwise it doesn't make much sense.
feline Posted - Oct 05 2006 : 10:39:31 AM
quote:
Originally posted by gbozoki

Would it be possible to simply join these two lists?


the two lists are actually doing quite different things. suggestions (question mark icons) are "guesses", so they are not limited to members of a class, and before now i have seen VA suggest ", " when i am adding familiar parameters in order

there is a problem in the screen shot, as you say, the suggestion should have been highlighted. we are looking to make some changes to highlighting of suggestion lists in the next few builds of VA.

case=2531


quote:
Originally posted by gbozoki

I'll take a look at my Autotext templates to make sure that I didn't disable something accidentally that worked before, but when I installed 1535, I started seeing a lot more of these than before. (I renewed my key on 19 August, so whichever version was available at that time seemed more successful at giving useful suggestions.)


i don't follow this bit.

there are actually 3 types of listbox.
* completion - the same as when you press CTRL-SPACE
* suggestion - guesses, with question mark icons
* autotext - these have an 'A' icon, and only appear when you type an autotext shortcut, or call "insert autotext".

what are you seeing more of? are you seeing more listboxes appear with no focus? it is possible the previous build of VA always put focus into suggestion listboxes, which can cause its own problems.
feline Posted - Oct 05 2006 : 10:16:14 AM
krk, using VS2005 with C#, if i add the function:

private void testSuggest()
{
    DateTime dt;
    dt.
}


to an existing class, as i type "DateTime" i am getting a suggestion listbox (question mark icons), since i have already used DateTime in the current class, and VA it thinks i may be reusing it.

as soon as i type the dot after "dt" i get a completion listbox. no question mark icons, and all of the members for the class DateTime. this is the same list you get when pressing CTRL-SPACE.

so VA is suggesting when it has an idea, and when there is a fixed, sensible list of things to produce, i get that.

can you try the same test on your machine and see what happens? what would you expect to see in this example?

"Get contents from default intellisense" actually only effects C++. if you are using C# then all of the entries for completion listboxes come from the IDE, VA simply controls how the lists are drawn, so it can shrink and filter them for you.
krk Posted - Oct 04 2006 : 2:18:07 PM
Thanks feline. Now I seem to get VAX suggestions only which is OK if VAX provides all of the desired functionality.

Another way I discovered was to give VAX keywords wacky strings such as p01 in which case MS turns off. But then, control is lost to MS intellisense for all else.

I have observed that MS intellisense still appears especially when typing namespaces.
Just out of curiosity, is it now VisualAssist that controls the appearance of MS suggestions?

Am I advised to check or uncheck 'Get contents from default intellisense'? Would I get better suggestions in either completion or a suggestion list?

Thanks.
gbozoki Posted - Oct 03 2006 : 4:00:59 PM
feline,

Thanks for your reply - I didn't really differentiate between the two types of lists.

Would it be possible to simply join these two lists? In the screenshot example I'd expect VA to offer "string" (and maybe StringBuilder) as suggestions and one of them should be preselected, since (I think at least) it's obvious that a variable name couldn't possibly appear in that context. When I'm typing, I never differentiate between "completion" and "suggestion": I'd simply like to get a list of symbols that match whatever I typed so far the best and the best match should be selected. If there is no match, then an alternative list of suggestions would be fine.

I'll take a look at my Autotext templates to make sure that I didn't disable something accidentally that worked before, but when I installed 1535, I started seeing a lot more of these than before. (I renewed my key on 19 August, so whichever version was available at that time seemed more successful at giving useful suggestions.)

Gyorgy Bozoki
feline Posted - Oct 03 2006 : 12:45:20 PM
quote:
Originally posted by gbozoki

When I type a symbol, it frequently doesn't appear in the completion list and even when it does, it shows up as an unknown symbol and is not selected, so Tab cannot be used to complete the symbol.


this is a separate effect.
your screen shot is of a suggestion listbox, not a completion listbox. see here for some more details on them:

http://www.wholetomato.com/products/features/suggestion.asp

they always have question mark icons. basically VA is guessing at what you want, and it will only offer up a few suggestions at a time. this is why some variables / functions will be missing from these lists.

you can use CTRL-SPACE to replace a suggestion listbox with a completion listbox, which should list all valid items for the current context.

the suggestion listbox has appeared without focus because VA thinks you are typing a new variable or member function, so its suggestion is probably wrong. we are looking to add an option to control this behaviour at some point, since it is causing a certain amount of confusion.
feline Posted - Oct 03 2006 : 12:40:16 PM
quote:
Originally posted by krk

I type VAX autotext shortcuts and all I get is Microsoft suggestions.


the problem is that VA will not overwrite IDE list boxes, so to give VA an option disable the option:

IDE tools menu -> options -> Text Editor -> C# -> IntelliSense -> Show completion list after a character is typed

you should now get autotext suggestions from VA
gbozoki Posted - Oct 02 2006 : 6:42:10 PM
I don't know if it's the same problem, but it seems so, so I'm posting this here.

I have similar problems with VS 2005 in C#.

VA_X.dll file version 10.3.1535.0 built 2006.09.15
VAOpsWin.dll version 1.3.3.6
VATE.dll version 1.0.5.8
DevEnv.exe version 8.0.50727.42
msenv.dll version 8.0.50727.42
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.2900.2180
Windows XP 5.1 Build 2600 Service Pack 2
2 processors

Platform: Win32
Stable Includes:
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\include;
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\include;
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include;
D:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\include;

Library Includes:
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc;
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfcm;
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl;
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\crt\\src;

When I type a symbol, it frequently doesn't appear in the completion list and even when it does, it shows up as an unknown symbol and is not selected, so Tab cannot be used to complete the symbol.

This is extremely annoying, as it happens 50%-75% of the time, even within the same file/function with local variables - it really makes VAX next to useless.

Here is a screenshot to show the problem where I wanted to type "string":


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