Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Generating #includes programatically

Check Organize Includes/Add Include feature of CDT, it must do something to insert includes ;)

On Thu, Feb 19, 2015 at 7:10 AM, Simon Levermann <simon@xxxxxxxxxxxxx> wrote:
Hello,

I'm currently looking into Code generation via the AST, and I want to
generate an #include statement: #include <utility>. This is needed for a
call to std::forward<T> which is used by some other code that I
generate. However, the only implementation of
IASTPreprocessorIncludeStatement is ASTInclusionStatement, which is a
package-private class inside ASTPreprocessorNode.java. Thus, I cannot
instantiate it outside of the
org.eclipse.cdt.internal.core.parser.scanner package.

What is the intended way of generating #includes (or other preprocessor
directives) and inserting them into the AST with an ASTRewrite?

Kind regards
Simon Levermann


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top