![](/img/trans.png)
[英]How do I exclude folder from 'find', but still browse in the Project view, in intellij?
[英]How do I exclude subdirectories from a project root in IntelliJ?
我正在探索一个模型,其中我在IntelliJ中为每个程序包.iml
一个.iml
文件。 例如,假设我有com.example.foo
, com.example.foo.bar
和com.example.foo.baz
。 这意味着在com.example.foo
的.iml
文件中,我需要:
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$"
isTestSource="false"
packagePrefix="com.example.foo" />
<excludeFolder url="file://$MODULE_DIR$/bar" />
<excludeFolder url="file://$MODULE_DIR$/baz" />
</content>
每次添加com.example.foo
的新“子包”时,都必须向<content>
添加一个新的<excludeFolder>
元素。 有什么方法可以避免这种情况,只说“我的源目录是直接目录,没有子目录?”
源根配置是递归的,不可能仅将目录配置为“源”,而排除其所有子目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.