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
 Find-Referrences bug?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jzq740176597
Tomato Guru

China
329 Posts

Posted - Sep 10 2013 :  8:55:34 PM  Show Profile  Reply with Quote
//parse_tool.h  
template<class Parser,class NodePtr,class XPathNode>
class CParseTool
{
   static NodePtr* addIEDByCopy(NodePtr* pCopySrc,NodePtr* pNode)
    {//.....
        return pNewIED;
    }
};
#define PuginTool  CParseTool<CPluginxmlMemTree,xml_node_struct,xpath_node>


//cpp
	NodePtr* addIcd_IED(NodePtr* pIcd){
		return PuginTool::addIEDByCopy(pIcd,m_rootItem);	//cann't be found!	
	}


Putting caret in addIEDByCopyof parse_tool.h and Find-References.cann't find the reference in cpp.(I'm sure the cpp is in the search scope<located in the same project>).
is bug?

Creation come from persist!

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Sep 14 2013 :  10:59:21 AM  Show Profile  Reply with Quote
Apologies for the slow reply. So far I cannot reproduce this problem. I am testing with the following code, which compiles, and uses different names, so you can test it on your system. In the header file I have:

template<class FelineParser>
class CFelineParseTool
{
public:
	// run Find References here, on the function, 2 references are found
	static void addFelineIEDByCopy(std::string copyThis)	{ }
};
#define FelinePuginTool  CFelineParseTool<std::string>

and in the matching cpp file I have:

void testFelineUsingPluginTool()
{
	// run Find References here, on the function, and 2 references are found
	FelinePuginTool::addFelineIEDByCopy("testing here");
}

I am testing with VS2010 and VA 1949. Can you please try my test code, and see what happens on your system?

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

jzq740176597
Tomato Guru

China
329 Posts

Posted - Sep 16 2013 :  12:38:09 AM  Show Profile  Reply with Quote
I have tried your test code,everything is OK!
But may I have catched the problem.
(1)the h file("parse_tool.h")is not located in the current project dir.because VA find-reference in it as external-file.
(2)in file which #include"parse_tool.h". the missing refercence of "addIEDByCopy" is unrecognized. I think this the reason of missing but why is not recognized?
maybe because "parse_tool.h" is external file or a template class file or the file which refering itself is also a template file? (not the cpp file, my write-error in above thread)

Creation come from persist!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Sep 17 2013 :  9:17:47 PM  Show Profile  Reply with Quote
Are you able to add the file "parse_tool.h" to your solution? So VA knows this file is one you use inside your solution, and will parse it and search it when doing a Find References.

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

jzq740176597
Tomato Guru

China
329 Posts

Posted - Sep 21 2013 :  8:32:13 PM  Show Profile  Reply with Quote
maybe not.bacause even though the "parse_tool.h" is not belongs to this solution but is located the directory the VA can find and search it,I like VA that function,I have utilize this for many times;
So I think not Belong to this solutoin is not the key-point. but a template class file is what leading to VA missing it !
is it?

Creation come from persist!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Sep 23 2013 :  5:52:14 PM  Show Profile  Reply with Quote
I believe Find References is designed to only search within your solution. If Find References had to search all of your library directories as well every time you did a find it would take a lot longer, and return a lot of unwanted results.

VA parses the library files, but we only need to locate structures, classes and functions. We don't need to parse all of the method bodies to support listboxes and Alt-g. Find References requires a lot more work.

I have tried a simple test here, and I am seeing the same Find References results for both a template and non template class.

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

jzq740176597
Tomato Guru

China
329 Posts

Posted - Sep 24 2013 :  8:20:21 PM  Show Profile  Reply with Quote
OK.thanks for your reply!
Best!

Creation come from persist!
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