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
 Feature Requests
 #include-completion improvement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

znakeeye
Tomato Guru

379 Posts

Posted - Jul 07 2009 :  03:36:12 AM  Show Profile  Reply with Quote
VAX 1649, VS2008 SP1.

In MFC classes are often prefixed with a 'C', but the header-file is not:
// MyClass.h
class CMyClass {};

Quite often I copy the class name to make an #include:

Ctrl+V, Ctrl+left, #include "
yields
#include "CMyClass|" (CMyClass selected)

Q1: Why is the text selected?
Q2: Would it be possible for VAX to auto-remove the C-prefix?

First look for "CMyClass.h". If not found, look for "MyClass.h". If found, remove mistyped 'C'.

GennadiyKorol
Ketchup Master

Israel
54 Posts

Posted - Jul 07 2009 :  10:12:47 AM  Show Profile  Reply with Quote
Shouldn't VAX work with the actual files where the symbol was defined and not just symbols name?

Correctness might be a theoretical concept but incorrectness has practical implications.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 07 2009 :  11:53:53 AM  Show Profile  Reply with Quote
In VA 1727 just use the new refactoring command "Add Include", which adds the #include statement for you.

znakeeye I have no idea why CMyClass is selected, I have just tried the same steps here and it is not selected for me.

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

znakeeye
Tomato Guru

379 Posts

Posted - Jul 07 2009 :  6:43:12 PM  Show Profile  Reply with Quote
Yeah, will try the new feature as soon as my boss renews our licenses...

Regarding the selection of "CMyClass". Could it be this registry-setting where you tell VAX to select the first item in the dropdown?


|CMyClass
#include "CMyClass|"

The text gets selected :(. 100% reproducible.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 08 2009 :  10:25:50 AM  Show Profile  Reply with Quote
A listbox should never be accepted without some form of interaction. You need to press some key or use the mouse to accept a listbox, or else you are using a modified VA Snippet for #include that is inserting the clipboard directly.

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