T O P I C R E V I E W |
Shambler |
Posted - Aug 24 2014 : 05:50:02 AM This is for the autocorrect option: Insert () and closing } ) ] ' "
Whenever I type a class name, and hit tab to auto-complete from the popup suggestions, this always adds a () after the class name, as if it is the class constructor being called.
This happens very regularly in pretty much all C++ code, and actually interrupts code flow, such as when I want to do something like "ClassName* VarName = NULL;", when I autocomplete I start with "ClassName()", then have to remove the (), and continue with the rest.
It would be good to either have the option to remove autocorrect for constructors, or to make autocorrect more intelligent about when it does that with constructors. |
5 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Aug 25 2014 : 6:25:29 PM Since this is now working correctly for you, its probably not worth spending any more time on. The solution, if we had to find one, would simply be to provide VA with a definition of the macro that makes sense, and that fixes the problem, and it sounds like your recent code update has already achieved this.
Obviously if you encounter any new problems, or if this problem comes back again, then please do let me know and I will do what I can to help you. |
Shambler |
Posted - Aug 25 2014 : 3:57:05 PM Thanks - I tried that now, though it didn't seem to fix the issue.
I grabbed the latest version of the project I'm working on, from source control, and that doesn't seem to have the issue anymore - I spent a while diffing the (quite large) codebase, to try and track down what changed to fix this, and wasn't able to figure it out.
I still have the old project folder containing the problem though, so can try out more things if you like - otherwise though, doesn't seem to be a problem with latest code, but I'll keep an eye out for it occurring again. |
feline |
Posted - Aug 25 2014 : 1:46:00 PM Can you please try creating a new text file, called "va_stdafx.h" and place it in the same directory as your .SLN or one of your .VCXPROJ files. Edit the file and insert the line:
#define PACKAGE_API
making sure the file ends with a blank line. Now press the button:
VA Options -> Performance -> Rebuild symbol databases
and restart your IDE.
There is no need to add this file to the solution, its a helper file that VA looks for, and it is used to help our parser understand complex code. Hopefully this will help here. This FAQ entry explains about using this file:
http://docs.wholetomato.com/default.asp?W302 |
Shambler |
Posted - Aug 24 2014 : 5:17:09 PM I think I've narrowed it down to only occurring with classes using a macro to define whether they are dllexport or such, i.e. "class PACKAGE_API ClassName : public Parent" vs "class ClassName : public Parent"
It looks like it might be the case, that PACKAGE_API is not defined until compile time (might only be in compiler commandline defines), or something similar like that, which could be breaking or confusing parsing within VAX.
It occurs in both .h and .cpp files, and I have VS2013 Update 3, with latest VAX (2014.07.10). |
feline |
Posted - Aug 24 2014 : 12:41:39 PM Strange, I am not seeing this happen here. Does this happen in both .cpp and .h files, or mainly just in .h files?
Which IDE and version of VA are you using? |
|
|