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
 Code completion inserts text at beginning of file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

chakie
New Member

Finland
9 Posts

Posted - Jul 08 2014 :  03:00:34 AM  Show Profile  Reply with Quote
I've used VA for a few months and have liked the nice code completion and syntax highlight. I use VS 2012 and it's a awful when it comes to editing C++, it doesn't do much to make your life nice and VA helps a lot there.

However, I've noticed that the code completion often bugs out and it creates annoying compilation errors. Often when the code completion popup comes up and I choose the right string, nothing seems to happen. So I do it again, nothing gets filled in. Eventually I type it manually after having wasted a lot of time and broken my mental flow. It turns out that VA has simply inserted the text at the beginning of the file, at position 0. Nowadays I know what happened and can go remove the crap before compiling and getting some weird compiler errors and wasting even more time.

It would be nice if this worked, as VA has found the correct completable text and the cursor is at the correct place (obviously, otherwise the completion would not know the context), so it just needs to insert the chosen text.

feline
Whole Tomato Software

United Kingdom
19004 Posts

Posted - Jul 08 2014 :  8:52:24 PM  Show Profile  Reply with Quote
This should not be happening, the suggestion should be being inserted at the caret position, and correct column.

If you look at:

IDE Tools menu -> Extensions and Updates...

what extensions are listed on you system? On a full install of VS2012 with VA I have the following extensions listed:

Microsoft Web Developer Tools
NuGet Package Manager
Visual Assist
Visual Studio Extensions for Windows Library for JavaScript

I am wondering if you have a different list, since an interaction problem with another extension could well explain the problem you are seeing.

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

chakie
New Member

Finland
9 Posts

Posted - Jul 09 2014 :  03:12:24 AM  Show Profile  Reply with Quote
I have:

* Microsoft ASP.Net and Web Tools
* NuGet Package Manager
* VA
* Visual Studio Extensions for Windows Library For Javascript

The error does not happen always, in most cases it works fine. Especially std::map<>::iterator seems to be troublesome when I want to refer to iter->first or iter->second.

Also things like the automatically changed . to -> can be very, very annoying. Not sure if that's something VA does?

Assume this:

boost::shared_ptr<Component> SharedComponent;
SharedComponent sc;

To access Component methods you do:

sc->foo();
sc->bar();

but sometimes you want to access something from boost::shared_ptr, like:

sc.reset( new Component );

Whatever I do, the "." (the dot) gets replaced with -> and it's very annoying. It usually ends with me having to copy and paste in the dot there or type "->." and then delete the "->" to get only the "." left. Very, very annoying.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19004 Posts

Posted - Jul 09 2014 :  3:20:53 PM  Show Profile  Reply with Quote
So much for my theory that this problem was being caused by another extension. Are you able to reproduce the problem with the listbox inserting the code at column zero on demand?

Dot being converted to -> is a VA feature, but this can get in the way when you actually want a dot, not ->. The first step is to simply press backspace once, this will undo the conversion, leaving you with the dot you originally typed.

If you never want VA to convert dot to -> you can turn off one or both of the options:

VA Options -> Correction -> Convert dot to -> (only in C/C++ files)
VA Options -> Correction -> Convert dot to -> if operator -> is overloaded

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

chakie
New Member

Finland
9 Posts

Posted - Jan 22 2015 :  02:37:17 AM  Show Profile  Reply with Quote
I didn't use VA for a while and now enabled it again in my VS 2012. This does now work perfectly, no bad replacements anymore. :)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19004 Posts

Posted - Jan 22 2015 :  12:22:25 PM  Show Profile  Reply with Quote
Thank you for the update. I still have no idea why you had these nasty problems, so I am glad that things are now working correctly for you.

zen is the art of being at one with the two'ness
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