Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Add symbol programmatically

Roberto Oliveria wrote:
> I can add a new macro going to Project Properties > C/C++ General > Paths and Symbols and in Symbols tab, I add the symbol and the value. After adding this macro, I can see it in Preprocessor Includes > Entries tab, under "CDT Managed Build Setting Entries".
> Is there a way to programatically add a macro under "CDT Managed Build Setting Entries"  in a plugin that I created?

If you want your macro definition to be passed to the compiler (the equivalent of entering it in "Paths and Symbols"), use an External Settings Provider:

If you want to make CDT aware of a macro that the compiler already knows about, i.e. make it appear in "Preprocessor Include Paths, Macros etc." (not under "CDT Managed Build Settings Entries" but under your own heading), use a Language Settings Provider: extension point org.eclipse.cdt.core.LanguageSettingsProvider (can't find a documentation link).


Back to the top