简体   繁体   中英

Java instead of XTend in XText project

According to the book about XText and XTend: "You can still generate Java stub classes by customizing the MWE2 workflow".

What do i change in my MWE2 file to make this happen?

Currently GenerateMyDsl.mwe2 looks like this: http://pastebin.com/3jp4B1X7

Thanks!

You can specify it on a per fragment level, or once in the config like this:

   // in MWE file
   component = XtextGenerator {
        configuration = {
            ...
            code = {
                preferXtendStubs = false
            }
        }
        ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM