Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Question about ICSettingEntry.INCLUDE_FILEandICSettingEntry.MACRO_FILE

Title: Question about ICSettingEntry.INCLUDE_FILE and ICSettingEntry.MACRO_FILE
I can tell you that org.eclipse.cdt.internal.core.parser.scanner2.BaseScanner.extendedScannerInfoSetup(CodeReader, IScannerInfo) gets back the include and macro files correctly and appears to parse them (pushContext is called).  Where do I set a breakpoint so I can actually see the list of macros the parser is using?
 
Also, I thought I'd try to reproduce this with a regular make project but I didn't see any UI to specify an include or macro file.  BTW, what exactly is the difference between the two?  A macro file is a header but is only allowed to include macros or something?
 
Thanks,
Warren


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of ext Schorn, Markus
Sent: Tuesday, October 16, 2007 2:37 AM
To: CDT General developers list.
Subject: RE: [cdt-dev] Question about ICSettingEntry.INCLUDE_FILEandICSettingEntry.MACRO_FILE

Yes, this should work. The scanner is configured by means of an IScannerInfo object. Please check whether it contains the macro definition or not.
Markus.

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Warren.Paul@xxxxxxxxx
Sent: Dienstag, 16. Oktober 2007 00:08
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Question about ICSettingEntry.INCLUDE_FILE andICSettingEntry.MACRO_FILE
Importance: Low

I want to define some macros in a file and have the CDT parsers use those macros when parsing source code.  I tried a simple test, returning a new CIncludeFileEntry and CMacroFileEntry from my CLanguageData#getEntries implementation.  I construct those with a full path to a simple header file in my project.  The header just contains:

#define FOO 1

In a source file if have something like:

#ifdef FOO
#include <foo.h>
#endif

But when I open that source file in the editor, the ifdef is grayed out, indicating that FOO is not defined.  I stepped through the code enough to know that my end of the code is working correctly (at least it appears to be).  But the BaseScanner code loses me.  Am I missing something?   Should this work?

Thanks,
Warren


Back to the top