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
 [1724]Intelligence problem in WTL, or template?
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

wondering
Senior Member

China
31 Posts

Posted - Jun 16 2009 :  05:50:03 AM  Show Profile  Reply with Quote
In my WTL project, VA intelligence often doen't work. In the snapshot bellow, class CCreateRepoDlg is inherited from template class CDialogImpl<>, but VA suggestion couldn't provide the members of the template class, such as Create(), ShowWindow(), etc.. How to explain this problem?
class CCreateRepoDlg : public CDialogImpl<CCreateRepoDlg>



My system info:
VA_X.dll file version 10.5.1724.0 built 2009.05.01
Licensed to:
VA X: terry
VA.NET 7.1: terry
DevEnv.exe version 9.0.30729.1
msenv.dll version 9.0.30729.1
Font: +?+?+?+?+?+? 12(Pixels)
Comctl32.dll version 6.10.6001.18000
Windows Vista 6.0 Build 6001 S
2 processors (x86)

Platform: Win32
Stable Includes:
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include;
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include;
D:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
D:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
E:\\SDK\\WTL8.1\\Include;
E:\\SDK\\boost_1_39_0;

Other Includes:

Stable Source Directories:
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfcm;
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\atl;
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\crt\\src;

--
wondering

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jun 16 2009 :  12:25:32 PM  Show Profile  Reply with Quote
So far I cannot reproduce the problem. I am using the test code:

class CCreateRepoDlg : public CDialogImpl<CCreateRepoDlg>
{

};

static void testNewWtlDialogClass()
{
	CCreateRepoDlg dlg;
	dlg.|;
}


Do you have:

VA Options -> Advanced -> Fonts and Colors -> Stable symbols in Italic

turned on? If so, is CDialogImpl shown in italic?
If you use alt-g on this class name, what happens?

I am being taken to the file:

C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include\\atlwin.h

Do you have:

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

turned On or Off?

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

wondering
Senior Member

China
31 Posts

Posted - Jun 16 2009 :  10:26:06 PM  Show Profile  Reply with Quote
VA Options -> Advanced -> Fonts and Colors -> Stable symbols in Italic turned on? If so, is CDialogImpl shown in italic? ------ Yes if the option is turned on.

If you use alt-g on this class name, what happens? ------ It goes to the atlwin.h normally, like yours.

Do you have: VA Options -> Advanced -> Listboxes -> Get content from default Intellisense turned On or Off? ------ OFF. But the suggestion works if this option was turned on. Great! Should I turned it on always?

--
wondering
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jun 17 2009 :  12:05:02 PM  Show Profile  Reply with Quote
You should not have to turn on "Get content from default Intellisense". I was testing with this turned off and it works correctly for me. There are some things that VA understands better, and there are some things that the IDE's intellisense parser understands better, so this gives you the chance to use which ever works better for you.

If you show VA View, then place keyboard focus back into the editor, and now hover the mouse over the class CDialogImpl is the correct information displayed?

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

wondering
Senior Member

China
31 Posts

Posted - Jul 05 2009 :  01:01:27 AM  Show Profile  Reply with Quote
It seems rihgt as the snapshot below, any help for you?

--
wondering
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 06 2009 :  2:06:17 PM  Show Profile  Reply with Quote
I am seeing basically the same thing. I don't understand why VA is having problems for you. Are you happy using "Get content from default Intellisense" ?

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

wondering
Senior Member

China
31 Posts

Posted - Jul 12 2009 :  12:22:13 AM  Show Profile  Reply with Quote
I don't use WTL often, so I prefer VA's Intellisense to "Get content from default Intellisense":(

--
wondering
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 13 2009 :  2:19:54 PM  Show Profile  Reply with Quote
Can you try downloading and opening the following test solution please:

http://forum.wholetomato.com/colin/forumimages/8811_wtl_listbox_test.zip

this is a simple VS2003 command line project where I have added the test code to the cpp file, and I have added comments describing a couple of tests I ran, in "wtl_listbox_test.cpp"

What results do you get?

This way we know we are both looking at the same solution, so it will be easier to compare things.

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

wondering
Senior Member

China
31 Posts

Posted - Jul 14 2009 :  11:37:32 PM  Show Profile  Reply with Quote
// place caret into this header file name and VA definition field should show:
// C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include\\atlwin.h

----OK
// "CDialogImpl" on the next line should be shown in italic
// if italic is turned on in VA options.

----OK
// type dot after this variable name and I get many functions listed
----NO WORK, no functions listed...
If I use "Get content from default Intellisense", the functions will list.

--
wondering
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 15 2009 :  10:37:05 AM  Show Profile  Reply with Quote
Can you please press the button:

VA Options -> Performance -> Rebuild symbol databases

then restart the IDE and load the test solution I uploaded. After VA has finished rebuilding its symbol database and VA's syntax colouring has been applied to the cpp file can you please re-run the tests and see what happens?

Obviously something is confusing VA, but I don't know what that something is. If this works correctly after a symbol database then it will suggest the problem is something in your main project. If it still fails then we need to look more closely at your stable include directories.

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

wondering
Senior Member

China
31 Posts

Posted - Jul 15 2009 :  9:49:05 PM  Show Profile  Reply with Quote
I'm sorry it can not work all the same. my stable include directories are as follow.

Platform: Win32
Stable Includes:
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include;
D:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include;
D:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
D:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
E:\\SDK\\WTL8.1\\Include;
E:\\SDK\\boost_1_39_0;

Threr are any problems in their order?

--
wondering

Edited by - wondering on Jul 15 2009 9:49:46 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 16 2009 :  12:19:32 PM  Show Profile  Reply with Quote
Do you mean the test failed after the symbol database rebuild? I do not see any obvious problems with your stable include directories.

If you are still seeing this problem after the symbol database rebuild can you please set:

VA Options -> Projects -> C/C++ Directories -> Platform = Custom

and set the list of include directories to:

C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include;
C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;

and then restart the IDE and load the test solution. This way you can simply change the platform back to "Win32" to get your old settings back.

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

wondering
Senior Member

China
31 Posts

Posted - Jul 16 2009 :  11:23:10 PM  Show Profile  Reply with Quote
I changed the Platform of VA Options to Custom and set the include directories according to your solution.
But I still saw the problem.
Then I rebuild the symbol database again, The problem also exists.
Oh...

BTW, recently I found out all template class I use can not be supported by VA, not only WTL. What a pity.

--
wondering
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 17 2009 :  12:55:15 PM  Show Profile  Reply with Quote
This should work for you, it works for me. This is very strange.

Do any template classes work for you? Can you try adding this simple test code to a file:

static void testStandardTemplate()
{
	std::list<std::string> listStrings;
	listStrings.front()|;
}

what happens when you type the dot here? I get the correct listbox on my machine, showing the members of std::string.

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

wondering
Senior Member

China
31 Posts

Posted - Jul 18 2009 :  12:43:18 AM  Show Profile  Reply with Quote
STL is supported perfectly by VA. I'm sorry for my ambiguous statement.
What I say means some template class I code meets this problem. But I forget where are them just now.

Here are some new finds when I use WTL:
CTabCtrl tabGroup = GetDlgItem(IDC_TAB_GROUP);
tabGroup.AddItem("Group");

If I use alt+g on GetDlgItem, it goes to winuser.h(Windows API), but if I press F12 on GetDlgItem it can go to atlwin.h(correct).
When I type the dot after tabGroup, it can't list AddItem function.

WTL::CTabCtrl tabGroup = CWindow::GetDlgItem(IDC_TAB_GROUP);
tabGroup.AddItem("Group");

If I write code like this, add WTL or CWindow before class and function name, alt+g works well and all member listed.

--
wondering
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 18 2009 :  11:51:05 AM  Show Profile  Reply with Quote
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 using the sample solution I made. 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.

Next time you see a template problem that does Not use WTL I would be very interested in more details. I am hoping it might provide some clues to this WTL problem.

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

wondering
Senior Member

China
31 Posts

Posted - Jul 19 2009 :  12:36:19 PM  Show Profile  Reply with Quote
I have sent them to you and expect your response.

--
wondering
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 20 2009 :  10:54:23 AM  Show Profile  Reply with Quote
I have the files, thank you for these. When you tell VA to rebuild its symbol database and restart the IDE, approximately how long does this take? It should only take 1 or 2 minutes, but after importing your VA settings it is taking much longer on my test machine.

But I don't understand why. This might be a factor, especially if it is as slow on your machine.

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

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 20 2009 :  11:02:36 AM  Show Profile  Reply with Quote
I have found one problem, in your settings you have set VA's data directory to F drive, but I do not have a F drive on my computer, which is why it was so very slow. So that explains that

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

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 20 2009 :  11:39:26 AM  Show Profile  Reply with Quote
I have imported your VA and IDE settings, and using the test project I uploaded I still cannot reproduce the problem. The test project was VS2003 format, that was my mistake, I got confused. I am now testing in VS2008, the same IDE you are using.

Can you post a screen shot of what you see when you type dot after "dlg" on line 18 please?

What happens if you use Escape to dismiss this listbox and then press CTRL-SPACE?


If you use alt-g on CDialogImpl what happens? I am taken to line 3454 in the file:

C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include\\atlwin.h

Are you taken to the same line in the same file? Or are you taken somewhere else? I am wondering if your header files for ATL and WTL are different to mine, since that might explain the problems.

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

wondering
Senior Member

China
31 Posts

Posted - Jul 20 2009 :  2:04:43 PM  Show Profile  Reply with Quote
I have converted your vs2003 project to vs2008, it doesn't matter:)

When I type the dot after "dlg", it happens nothing, no listbox showed. So I think it's not necessary to snapshot screen.

It's go to line 3450 when I use alt+g on CDialogImpl, the file is the same with yours.

--
wondering
Go to Top of Page

wondering
Senior Member

China
31 Posts

Posted - Jul 20 2009 :  2:06:36 PM  Show Profile  Reply with Quote
atlwin.h code:
template <class T, class TBase /* = CWindow */>
class ATL_NO_VTABLE CDialogImpl : public CDialogImplBaseT< TBase >
{ // 3450
public:
#ifdef _DEBUG
	bool m_bModal;
	CDialogImpl() : m_bModal(false) { }

--
wondering
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 20 2009 :  2:32:06 PM  Show Profile  Reply with Quote
What happens when you press CTRL-SPACE after the dot? This should force a listbox to appear.

Do you have any other IDE plugin's installed?
Is there anything "odd" about your system that might be a factor?

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

wondering
Senior Member

China
31 Posts

Posted - Jul 21 2009 :  08:05:01 AM  Show Profile  Reply with Quote
It also happens nothing when I press Ctrl+Space after the dot,
but it can show the listbox if I press Ctrl+Alt+Space(Complete Word of IDE). I have shot the screen as below:


If I declare a method in the calss, when I type the dot after "dlg", it's state will like this:


But it works well in my vc6 IDE:


Another plugin of My IDE is VisualSVN and nothing else.

--
wondering

Edited by - wondering on Jul 21 2009 08:06:17 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 21 2009 :  3:13:53 PM  Show Profile  Reply with Quote
If you look at:

IDE tools menu -> Add-in Manager -> list of available add-ins

is VisualSVN listed? If it is listed can you uncheck the check boxes, so that it will not automatically run when you load the IDE. And then restart the IDE and re-run these simple tests. I am hoping we can find out if this is a factor or not.

Since this works correctly in VC6 it is not a problem with VA's parser on your system. So something else must be causing it.

Can you please add this new test code to the test function:


	CDialogImpl<CCreateRepoDlg> dlgImpl;
	dlgImpl;

	CDialogImpl dlgBasic;
	dlgBasic;


and try typing a dot after each of these new variables. Do you get a VA listbox in either case?

What about with the code:

CDialogImpl::

you should get a listbox from the IDE when you type the double colon, so there should be no pale tomato icons in the background of the icons.

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

wondering
Senior Member

China
31 Posts

Posted - Jul 22 2009 :  10:04:17 PM  Show Profile  Reply with Quote
VisualSVN is not be listed in the add-in manager, but I found the other one add-in names VisualFC,
which provides WTL/WinxGui Wizard. I forgot it the other day. //shy...

Then I disable it and restart my IDE, however, it was no any effect for this problem.
Another member of my team uses the same IDE and VisualFC with me,
the difference is his OS is WinXP, but his listbox is normally.

The new test result:

	CDialogImpl<CCreateRepoDlg> dlgImpl;
	dlgImpl;

The listbox doesn't show.

	CDialogImpl dlgBasic;
	dlgBasic;



	CDialogImpl::


--
wondering

Edited by - wondering on Jul 22 2009 10:07:24 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 23 2009 :  2:20:37 PM  Show Profile  Reply with Quote
Is the listbox correct on this other machine?

This looks like a VA parser problem, but there does not seem to be a general problem with VA's parser, the problem, what ever it is, is machine specific.

Is the anti-virus software and anti-virus settings the same on both machines?
Are there any obvious differences between the two machines?

The screen shots are really interesting, thank you for these. It looks like VA does not understand that CDialogImpl is a derived class, since all of the items in the listbox are bold, but that does not make much sense.

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

wondering
Senior Member

China
31 Posts

Posted - Jul 24 2009 :  01:32:09 AM  Show Profile  Reply with Quote
I test on three other machine, one Vista, two XP. They are all correct.
Our anti-virus software are all ESET NOD32, which isn't a factor I think.

Could you provide me a debug VA version for debugging this problem?
It's a pleasure for me to assist you with this special case.

--
wondering
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 24 2009 :  1:51:13 PM  Show Profile  Reply with Quote
One more test, and then VA log files. Can you please close all instances of the IDE and then in your registry delete or rename the key:

HKCU \\ Software \\ Whole Tomato \\ UserDataDir = "..."

and then load the test solution. VA should now rebuild its symbol database in the default location, probably on C drive. This is about the only difference I have not been able to test, so it might be a factor. I don't understand why it might be a factor, but this should be a quick and easy test.

Does this make any difference to the VA listboxes?

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

wondering
Senior Member

China
31 Posts

Posted - Jul 27 2009 :  04:21:54 AM  Show Profile  Reply with Quote
I have tested it according to your suggest. But there isn't any change. I think it's not a factor.
I did another test later: I uninstalled VA, and clear its root registry(delete all items).
Then I installed VA again and used the default VA settings, but it's also not correct when I open the test project.

I have no choice now, I want to give up...

--
wondering
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18794 Posts

Posted - Jul 27 2009 :  3:50:42 PM  Show Profile  Reply with Quote
Many apologies for all of the problems you are having. There is clearly a serious problem, but I have no idea what is causing it.

Using the test project can you please try the following.

Press the button:
VA Options -> Performance -> Rebuild symbol databases

reload the IDE, and turn on VA logging:

VA Options -> Performance -> Enable logging

BEFORE you load the test solution. Then load the test solution, and once VA has finished parsing try triggering the listbox on the original test plus the three tests:

CDialogImpl<CCreateRepoDlg> dlgImpl;
dlgImpl;

CDialogImpl dlgBasic;
dlgBasic;

CDialogImpl::


and then close the IDE to stop the log files from getting to large. Please see this FAQ for details on sending me the log files

http://docs.wholetomato.com?W305

hopefully the log files with give us some clues.

zen is the art of being at one with the two'ness
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000