简体   繁体   English

Mac OSX上的IntelliJ Idea中的区分大小写的文件

[英]Case sensitive files in IntelliJ Idea on Mac OSX

My java project has files which have same name but different cases (Test.java & test.java). 我的java项目包含具有相同名称但不同情况的文件(Test.java和test.java)。 I have setup a case sensitive file system on my mac and am able to view/edit them via CLI. 我在我的mac上设置了一个区分大小写的文件系统,并且能够通过CLI查看/编辑它们。 However, Intellij Idea does not regard them as different and compilation fails. 但是,Intellij Idea并不认为它们不同,编译失败。 How can I fix Intellij Idea to honor cases for a file name? 如何修复Intellij Idea以保护文件名的案例?

Thanks 谢谢

I filed a support request at JetBrains. 我在JetBrains提出了支持请求。 Here is the answer: 这是答案:

add "idea.case.sensitive.fs=true" to bin/idea.properties file ( https://intellij-support.jetbrains.com/entries/23395793 ), perform File | 将“idea.case.sensitive.fs = true”添加到bin / idea.properties文件( https://intellij-support.jetbrains.com/entries/23395793 ),执行文件| Invalidate Caches and restart the IDE. 使高速缓存无效并重新启动IDE。

It solved the issue for me. 它为我解决了这个问题。

update: 2015-02-14 / Idea 14.0.3 更新:2015-02-14 / Idea 14.0.3

It is no longer sufficient to add the property to the idea.properties file. 将属性添加到idea.properties文件已经不够了。 Add -Didea.case.sensitive.fs=true to "Settings | ... | Java Compiler | Additional command line parameters". -Didea.case.sensitive.fs=true添加到“设置| ... | Java编译器|其他命令行参数”。

要更新区分大小写的设置,您只需在shell中运行下面的内容(因为我使用php风暴但是应该适用于喷气机智能产品,因此必须更改InteliJ的路径)

echo idea.case.sensitive.fs=true >> /Applications/PhpStorm.app/Contents/bin/idea.properties

It looks like the best option may be to add the idea.properties option to user profile configuration rather than global. 看起来最好的选择可能是将idea.properties选项添加到用户配置文件配置而不是全局。

See the first comment here: 请参阅此处的第一条评论:

https://confluence.jetbrains.com/display/IDEADEV/Filesystem+Case-Sensitivity+Mismatch https://confluence.jetbrains.com/display/IDEADEV/Filesystem+Case-Sensitivity+Mismatch

Also this page mentions where the idea.properties file should go, if you don't have one already. 此页面还提到了idea.properties文件应该去的位置,如果你还没有。

https://www.jetbrains.com/help/idea/file-idea-properties.html https://www.jetbrains.com/help/idea/file-idea-properties.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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