Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CDT API Forum and ASTVisitor

Though I'm not qualified to make any statements/remarks I feel very strongly to throw in my "2 cent architectural view"

Though it is not clear from the code I think you are querying the indexer "about the file XYZ.h".

From that point of view it is expected that the indexer also parses the included files (like ABC.h) and returns results from included files.


in short: IMHO  XYZ.h is a entry point (known by XYZ.h) and not a filter (is in XYZ.h).


Best regards

Jantje


Op 8/05/2020 om 10:18 schreef Ming Cheng:
Hi All,

Seems there is no CDT API Forum. Please kindly let me know if there is one. Home » Language IDEs » C / C++ IDE (CDT) seems for IDE user.

Assume I have a header file XYZ.h and its content is:

#include "ABC.h"
class XYZ
{
....
}

My java processing code to this effect:

ITranslationUnit tu= (ITranslationUnit) CoreModel.getDefault().create(file);  // file here is XYZ.h
IASTTranslationUnit ast= tu.getAST();
ast.accept(new ASTVisitor());

It seems to me that the visitor also visit ABC.h file content which is out of my expectation.

Thanks.

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top