Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Missing suggestions in C# / VS 2008 and VA 1738

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
gbozoki Posted - Oct 08 2009 : 11:30:58 PM
After I installed the 1738 build, I noticed that I get drastically fewer suggestions in C# than before. The last build I used before that was 1727, which seemed to work fine.

With 1738, I hardly ever receive suggestions anymore after pressing '='. In 1727, when I typed something like:

int lVar;
lVar = m_lSo... // typing m_lSomeValue

the suggestion listbox appeared after m_ and it kept offering suggestions (narrowing down, too) as I typed. With 1738, I almost never see this list anymore - I mostly have to type symbols all the way. (Ctrl+Space works to finish symbols.) Even when it shows up, it mostly shows completely wrong and unrelated information (the symbols that appear exist in the code, but elsewhere.) I don't think I've seen correct member variable suggestions with this version.

Is this a known issue or did I miss a new setting that controls the list behavior?

I tried rebuilding the symbol DB and clearing the cache, it didn't help. I also saw this behavior on coworkers' computers.
7   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 13 2009 : 2:23:19 PM
At a guess it sounds like something is confusing VA's parser. Are local variables being shown correctly in bold, assuming you have turned on:

VA Options -> Advanced -> Fonts and Colors -> Local symbols in Bold
gbozoki Posted - Oct 13 2009 : 12:18:52 AM
Yes, I meant generics - the project only uses C#. There are a few PInvoke definitions, but nothing really complicated beyond that. LINQ is not used at all - in fact, LINQ is not even referenced in files (no using directives.) Also, 1727 (and before) seemed to be able to handle it reasonably well, so a change happened in VAX between that and the current version.

When I tried the sample, I tried it in a fresh new project, as generated by the new Console project wizard. It had no extra references, beyond what was added by the wizard. The file only had the definitions of those 2 classes, nothing more.

In real-life projects I see the problem in several other projects - in fact, I think it's pretty much all over the place. I also saw it happen to coworkers on other computers. I was very suprised to see it work in that small sample, as it doesn't seem to work in any of the real-life projects that I work on.

I'll try your suggestions and get back with how they worked.
accord Posted - Oct 12 2009 : 4:14:18 PM
VA's uses a parser which is separate from the compiler, so in odd cases it may get confused where the compiler can handle the syntax.

quote:

I don't know if this helps or not, but the project has about ~60 template classes and relatively long inheritance chains (5-6 levels of inheritance.)


Do you mean C# generics?
Are you using only C#?

Not easy. The key is to find the key difference in the "real" project compared to your "clean new" project which causes the problem in the actual version.
I don't think that a deep inheritance can cause something like this. But most likely this is caused by generics, or other "tricky" feature like LINQ.

When you tried your code snippet in your "real" project, did you try it in an empty file? I mean a file with only the necessary things like using directive, etc.
If you didn't, can you please try your snippet in a nearly empty file to see what happens?
If the suggestion working there, then can you please try to insert the snippet to the beginning of a file from your real project? What happens there?
If it's still working, you can try cut and paste into the middle of the file to see what happens?
What I am getting at is you may be able to find the problematic code with this method, so you may be able to share what type of code needed to put before the snippet to confuse the parser, to reproduce the problem, to fix this regression.
gbozoki Posted - Oct 11 2009 : 9:09:16 PM
accord, thanks for the reply. I tried the sample in a clean project and it seems to be working there. When I press space after the '=', I first get the listbox, where m_sValue is shown on top (nothing is selected.) Then after typing 'm_', the list shows m_sValue and m_oObj and the list filters down correctly as I'm typing.

It still doesn't work in my project, though. The project compiles without errors or warnings.

I don't know if this helps or not, but the project has about ~60 template classes and relatively long inheritance chains (5-6 levels of inheritance.) There are very few protected and no public member variables.

Any ideas what to try? Is it possible that some registry options changed during installation that may cause this?
accord Posted - Oct 11 2009 : 7:12:42 PM
I am seeing different suggestions here (without pressing ctrl+space):



So it is possible that something confuses VA's parser in your project in this new version. Can you please try this snippet in a new test project to see what will happen?
If the suggestion start working it means we have to figure out which code or project setting may confuse the parser in the new version so we can fix it.
If it doesn't work even in the new project, can you please export your VA and IDE settings and send them to me:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

...so I can import them here to test the behavior.
Please submit the files via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up.
gbozoki Posted - Oct 09 2009 : 9:39:33 PM
The project where I see the change has ~800 classes - v1727 worked well and I see the changes with v1738.

I haven't tried with a small example but here's the actual line that I did try (I added this code to the project.) Consider this:

public class OtherClass
{
    private string m_sStr = String.Empty;

    public string Str
    {
        get
        {
            return ( m_sStr );
        }
    }
}

public class SomeClass
{
    private OtherClass m_oObj = new OtherClass ();
    private string m_sValue = "A string";

    private void DoSomething ()
    {
        string sVal;

        sVal = |   // trying to type m_oObj.Str;
    }
}


Where the caret is (and the comment), I expect the suggestion list to offer m_oObj and m_sValue - that's what I got with v1727.

With v1738, I get a listbox with a few items (like new string), but m_sValue is not shown, neither is m_oObj. When I type 'm', the listbox disappears and doesn't come back, even though I may be typing 'm_sValue' or 'm_oObj', both of which are valid symbols in the current context.

I can force the suggestion list by pressing Ctrl+Space and when I type the rest of the symbol, it works from that point on. But if I don't, I don't get any suggestions anymore.

I don't know if suggestions in v1727 came from VAX or VS, since I don't use the tomato icons, but VAX is the only thing that changed.
accord Posted - Oct 09 2009 : 3:50:53 PM
Lets proceed step by step: first, about the suggestion after =. I tried a simplified source which is similar to yours, and I got the correct suggestion after =<space>:



I created a new C# project, placed a button onto the default form, double clicked on the button, put the member variable m_Solaris, and finally wrote the snippet into the event handler member function.

Can you please try what happens in a simple case like this in a clean new project? Are you seeing different thing in your "real" project?

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