[英]When trying to open a .java file from windows explorer I get a “No project found to open file in” error message
So, when I double click a file in windows explorer, Intellij fires up, but instead of just showing me the file I want to see, shows up the following message:因此,当我在 windows 资源管理器中双击文件时,Intellij 会启动,但不是只显示我想查看的文件,而是显示以下消息:
I think I get what it means: it means this given.java file isn't associated with an Intellij project.我想我明白这意味着什么:这意味着这个 given.java 文件与 Intellij 项目无关。
That's actually true, but even so I'd like to be able to open the file and see it with syntax highlighting and such.这实际上是真的,但即便如此,我希望能够打开文件并通过语法突出显示等方式查看它。
How to overcome this problem?如何克服这个问题?
Thanks谢谢
It's a known limitation which we plan to address in the future versions to allow opening and editing individual files without project context.这是我们计划在未来版本中解决的已知限制,以允许在没有项目上下文的情况下打开和编辑单个文件。
Please watch/vote the related issue .请观看/投票相关问题。
I don't think you
can't
can by default.我不认为你
不能
默认。 I'm assuming you are opening downloaded files or such.我假设您正在打开下载的文件等。 What I would is create a project ( Scrapbook
for example is a good name) on desktop and I would put/download the file I want to see in the corresponding src folder.我要做的是在桌面上创建一个项目(例如Scrapbook
是一个好名字),然后将我想在相应的 src 文件夹中查看的文件放入/下载。 That way when I'm clicking it would open properly.这样,当我单击它时,它会正确打开。
Most of the syntax highlight and such goodness of idea comes from a proper project setup (proper JDK paths, libraries, etc).大多数语法亮点和这种想法都来自正确的项目设置(正确的 JDK 路径、库等)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.