Using CDT parser seperate from Eclipse [message #1753708] |
Thu, 09 February 2017 03:10  |
Eclipse User |
|
|
|
To analyze C++ source code which is in my server, I need to use CDT Parser apart from Eclipse.
Is there any good way for doing semantic analysis?
By using below code I succeeded syntactic analysis only.
IScannerInfo scanInfo = new ScannerInfo();
IParserLogService log = new DefaultLogService();
IncludeFileContentProvider fileCreator= IncludeFileContentProvider.getEmptyFilesProvider();
IIndex index = null;
int options = 8;
reader = FileContent.createForExternalFileLocation("fullPath");
GPPLanguage.getDefault().getASTTranslationUnit(reader, scanInfo, fileCreator, index, options, log)
I found out that the failure reason is index = null.
Because index object is managed by Eclipse WorkSpace, Project, creating index instance is so hard. (coupling)
Is there any good way to use Index without Eclipse workspace and project?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05363 seconds