简体   繁体   English

尝试从 windows 资源管理器打开 a.java 文件时,我收到“找不到可打开文件的项目”错误消息

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

相关问题 尝试使用Intent打开文件时出现“找不到媒体”错误 - When trying to open a file with Intent getting 'Media not found' error 使用Java创建的ZIP文件,在Windows资源管理器中打开时显示为空 - ZIP file created using Java showing empty when open with Windows Explorer 尝试在Eclipse中打开Java文件时出错 - Error while trying to open java file in Eclipse 如何使用 java 在打开的资源管理器 window 上打开 select 文件 - How to select file on an open explorer window with java GWT在客户端打开Windows资源管理器/文件资源管理器 - GWT Open Windows Explorer / File Explorer on client side 如何打开资源管理器中的文件并将其复制到目录中? - How can I open a file from the explorer and copy to a directory? 从Eclipse中的打开文件中展开Project Explorer,Package Explorer或Navigator视图? - expand Project Explorer, Package Explorer, or Navigator view from open file in Eclipse? 如何使用java代码打开Windows文件浏览器并突出显示指定的文件? - How to use java code to open Windows file explorer and highlight the specified file? 在java中打开Windows资源管理器 - Open up windows explorer in java 打开 package 资源管理器和尝试在 Eclipse 中打开 java 类时出错 - Error when opening package explorer and when trying to open java classes in Eclipse
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM