T O P I C R E V I E W |
legalize |
Posted - Dec 16 2013 : 09:50:37 AM Symbol complete "f" to "foo" in the following context:
class foo
{
public:
foo() { }
~f
};
After completing the symbol, the ~ is deleted.
Verison 10.8.2001.0 built 2013.09.20 |
10 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Jan 02 2014 : 1:37:12 PM That makes sense, when working with existing code you tend to use shorter snippets, that are less worth triggering manually via the toolbar button. |
legalize |
Posted - Jan 02 2014 : 12:03:23 PM Snippets are fine for "green field" development and I do use them to generate some boiler plate (just made a new snippet the other day for creating a new Boost.Test unit test source file).
However, in this case, I was adding an explicit destructor to a class that was previously using the default destructor. My example was pared down for the bug report. |
feline |
Posted - Dec 31 2013 : 11:33:29 PM Disabling the IDE intellisense was the missing step, I am now seeing the same problem, thank you for the update. I have put a bug report in for this:
case=79308
Are you aware you can trigger VA Snippets even when you have listboxes turned off? Simply use the Insert VA Snippet toolbar button. You could use a snippet to generate your class template, and even have it prompt you for the class name, or pick it up from the code. This would give you the speed and usefulness of the Snippets, without the listboxes you want to avoid:
http://docs.wholetomato.com/default.asp?W171 |
legalize |
Posted - Dec 25 2013 : 01:09:36 AM I have all "suggestions" turned off as much as possible, including disabling intellisense. They just get in my way and slow me down when I'm typing code.
I experienced the problem using VS2012 and Windows 7. |
feline |
Posted - Dec 23 2013 : 4:57:01 PM Testing winXP, VS2010 and VA 2001, I have turned Off:
VA Options -> Advanced -> Listboxes -> Display filtering toolbar when hovering VA Options -> Advanced -> Listboxes -> Shrink when possible VA Options -> Advanced -> Listboxes -> Allow Acronyms and Shorthand VA Options -> Advanced -> Listboxes -> Prefer Acronym matches VA Options -> Advanced -> Suggestions -> Include suggestions in listboxes VA Options -> Advanced -> Suggestions -> Include VA Snippets in listboxes
and I have turned On:
VA Options -> Advanced -> Listboxes -> Get content from default Intellisense
Have you turned off IDE listboxes as well?
Using your text code, and using CTRL-SPACE to trigger completion, I still cannot reproduce the problem.
Which IDE and OS are you using?
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
I can then import them here and see if I can reproduce the problem.
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.
I may be able to help with your listboxes being accepted at the wrong time, once I know the IDE, so I know which options are available to edit, and where the listboxes are coming from. |
legalize |
Posted - Dec 20 2013 : 9:36:25 PM Type ~f and then press the keyboard shortcut to activate completion.
I have auto suggest stuff turned off as much as possible because it flashes up windows all the time while I'm typing correct code and has a tendency to complete my partially typed correct code into incorrect code.
#1 rule for code completion that is "greedy": if I am typing correct code, it should never cause it to become incorrect simply by typing correct code. Autocomplete suggestions that select a highlighted item when I type "." are the worst offenders here when introducing a new variable, method, type, etc. |
feline |
Posted - Dec 19 2013 : 6:17:55 PM Are you able to reproduce this on demand?
Does this happen with the actual test code you have provided, or is it somehow class name, or file specfic?
I cannot reproduce this problem here, trying VS2010, VA 2001, testing under Windows 7 x64.
Here, simply typing ~ is enough for VA to suggest the full destructor name, and I am able to accept the suggestion, to get the destructor entered, without any further typing. |
foxmuldr |
Posted - Dec 16 2013 : 2:52:17 PM I think VAX is concluding that you didn't mean to use the non-existent destructor name, and instead intended to type the function name that does exist, so it replaces the "errant portion" in whole. |
legalize |
Posted - Dec 16 2013 : 2:40:28 PM quote: Originally posted by foxmuldr
Should this auto-complete?
Yes, and given the syntax of C++ and the context of this example, the only valid thing it should ever complete to is the name of the class. There is absolutely nothing else that could ever be valid C++ in this context.
Furthermore, completion of a symbol should never remove things that are not part of the symbol. ~ is not part of the symbol, only 'f' is part of the symbol. |
foxmuldr |
Posted - Dec 16 2013 : 11:19:03 AM Should this auto-complete? The destructor hasn't been defined yet at that point. It seems natural to swap it out for the defined method name (without the tilde) if auto-accepting VAX's suggestion. |