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
 Symbol completion after ~ deletes ~
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

legalize
Tomato Guru

USA
119 Posts

Posted - Dec 16 2013 :  09:50:37 AM  Show Profile  Reply with Quote
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

http://legalizeadulthood.wordpress.com

foxmuldr
Tomato Guru

USA
416 Posts

Posted - Dec 16 2013 :  11:19:03 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

legalize
Tomato Guru

USA
119 Posts

Posted - Dec 16 2013 :  2:40:28 PM  Show Profile  Reply with Quote
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.

http://legalizeadulthood.wordpress.com
Go to Top of Page

foxmuldr
Tomato Guru

USA
416 Posts

Posted - Dec 16 2013 :  2:52:17 PM  Show Profile  Reply with Quote
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.

Edited by - foxmuldr on Dec 17 2013 07:32:29 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Dec 19 2013 :  6:17:55 PM  Show Profile  Reply with Quote
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.

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

legalize
Tomato Guru

USA
119 Posts

Posted - Dec 20 2013 :  9:36:25 PM  Show Profile  Reply with Quote
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.

http://legalizeadulthood.wordpress.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Dec 23 2013 :  4:57:01 PM  Show Profile  Reply with Quote
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.

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

legalize
Tomato Guru

USA
119 Posts

Posted - Dec 25 2013 :  01:09:36 AM  Show Profile  Reply with Quote
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.

http://legalizeadulthood.wordpress.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Dec 31 2013 :  11:33:29 PM  Show Profile  Reply with Quote
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

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

legalize
Tomato Guru

USA
119 Posts

Posted - Jan 02 2014 :  12:03:23 PM  Show Profile  Reply with Quote
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.

http://legalizeadulthood.wordpress.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jan 02 2014 :  1:37:12 PM  Show Profile  Reply with Quote
That makes sense, when working with existing code you tend to use shorter snippets, that are less worth triggering manually via the toolbar button.

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