简体   繁体   English

如何告诉netbeans gradle插件将生成的源文件添加到Source Packages?

[英]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.

相关问题 如何在Gradle和IntelliJ中将生成的源文件夹添加到我的源路径? - How can I add a generated source folder to my source path in Gradle and IntelliJ? 如何将生成的源文件夹添加到 Gradle 中的源路径? - How can I add a generated Source Folder to my Source Path in Gradle? 如何将“源包”文件夹添加到 Maven 项目 (Netbeans) - How to add “Source packages” folder to a maven project (Netbeans) 如何查看我在 netbeans 中使用的包的源代码? - How do I see the source code from packages I use in netbeans? Maven - 如何在使用 maven-source-plugin 生成的.jar 文件中包含 jsp 文件 - Maven - How can I include jsp files in the .jar file generated using maven-source-plugin JOOQ Maven插件-生成的源文件的编码 - JOOQ Maven plugin - encoding of generated source files 如何获取IntelliJ的“项目文件”视图以显示源文件夹中的软件包和目录? - How do I get IntelliJ's Project Files view to show the packages and directories in the source folders? 如何在其他模块的源集中添加proto生成的文件? - How to add proto generated files in source sets of other modules? 创建gradle插件时,将生成的Java或Kotlin源放在哪里? - Where to put generated java or kotlin source when creating a gradle plugin? 如何告诉visualvm在哪里找到我的源代码? - How do I tell visualvm where to find my source code?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM