[英]How do I tell the netbeans gradle plugin to add generated source files to Source Packages?
I would like to use gradle to automatically generate antlr4 source files from their grammars. 我想使用gradle从它们的语法自动生成antlr4源文件。 This gradle template does most of the work. 此gradle模板完成了大部分工作。 What is missing is adding the generated source folder to netbeans so it doesn't class not found errors in the editor. 缺少的是将生成的源文件夹添加到netbeans中,这样它就不会在编辑器中分类未找到错误。 The template has plugin for IDEA IntelliJ, so I tried to see if something similar was possible with netbeans, but haven't been able to find anything. 该模板具有用于IDEA IntelliJ的插件,因此我尝试查看netbeans是否有可能实现类似的功能,但找不到任何东西。 I looked at the netbeans gradle plugin , but couldn't see away to do it. 我看着netbeans gradle插件 ,但看不到做到这一点。
Does anyone know how to modify what Netbeans' gradle plugin reads as source files? 有谁知道如何修改Netbeans的gradle插件读取为源文件的内容?
I found the answer and it's odd. 我找到了答案,这很奇怪。 If you use the template with the IDEA plugin left in, the generated source code is added to Source Packages in netbeans. 如果将模板与IDEA插件一起使用,则生成的源代码将添加到netbeans的“源包”中。 There is nothing to configure. 没有什么可配置的。 It just works. 它只是工作。 It seems some of the IDEA plugin functionality is generic. 似乎某些IDEA插件功能是通用的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.