请问intellij idea或AS里面Mark Directory As里Sources Root 和Generated Sources Root 有什么区别

星辰旋风 2016-06-14 02:54:24
请问intellij idea或AS里面Mark Directory As里Sources Root 和Generated Sources Root 有什么区别
...全文
10320 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
dream新世界 2017-02-07
  • 打赏
  • 举报
回复 1
更加倾向于文件夹中很多类都是经常需要重新重构和快速生成和修复。 比如:SpringJPA的所需的实体类Entity_是可以快速生成,生成的文件夹最好标记为Generated Sources Root
dream新世界 2017-02-07
  • 打赏
  • 举报
回复
The difference is that the generated source roots are not suggested as target folders when performing the Move Class refactoring or using the Create Class from Usage quick fix. 这是官方说明两者的区别,自己翻译吧,我是看懂了,英文一般就不写上意思了。
星辰旋风 2016-06-20
  • 打赏
  • 举报
回复
为什么没人回答?
ESC尛蜜蜂 2016-06-20
  • 打赏
  • 举报
回复
https://www.jetbrains.com/help/idea/2016.1/content-root.html?origin=old_help
ESC尛蜜蜂 2016-06-20
  • 打赏
  • 举报
回复
Source roots (or source folders). By assigning a folder to this category, you tell IntelliJ IDEA that this folder and its subfolders contain source code that should be compiled as part of the build process. In Java modules, the subfolders within the source roots represent your Java package structure. You can assign a package prefix to a source root (e.g.com.mycompany.myapp) instead of creating the corresponding folder structure within that source root (e.g.com/mycompany/myapp). For more information, see Package prefix for Java source roots. In the absence of the package prefix and the subfolders, a source root would represent the default package (an unnamed package). Generated source roots (or generated source folders; in certain views the [generated] text marker is used) are similar to source roots. The difference is that the generated source roots are not suggested as target folders when performing the Move Class refactoring or using the Create Class from Usage quick fix. 不是很懂

80,350

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧