intellij – 当我正在使用文件时,文件突然从视图中消失

huangapple go评论75阅读模式
英文:

intellij - open files disappear from view while I'm using them

问题

不确定这是一个错误还是需要调整的设置,所以我在这里发布这个问题,以防它是后者。我刚刚将我的IntelliJ Community Edition更新到2022.2.5版本。

我的Java项目在项目视图中列出(到目前为止,我在每个项目上都遇到了这个问题)。我正在进行Java工作,所以我转到src文件夹,浏览文件夹并找到要处理的类,比如PolicyService.java。我打开了它并查看它,可能会对它进行更改,也可能不会。然后我转到PaymentsService.java并打开它,现在我有两个类打开并显示在视图中(不确定屏幕上的窗口名称,其中您打开文件并对其进行编辑)。然后也许我会打开几个更多的文件(尽管当我只有一个文件打开时也会发生)。

然后突然,所有文件都从视图中消失了,项目视图突然折叠了所有打开的文件夹,因此看起来就好像我没有打开任何文件夹。只有项目名称文件夹,以及同一级别的外部库、刮擦和控制台文件夹。

更奇怪的是发生在项目视图和打开文件视图上方的面包屑的情况。当我打开文件时,它是正常的 - 项目名称 > src > main > java > com > am > api > appdesk > service > PolicyService > 我正在处理的方法。但是当文件消失时,它变成了Sample > sample > sample > sample > sample > sample > sample > sample > sample > sample >(无法记住方法位置时显示的内容)。它会保持这样几分钟,然后面包屑会消失。

另一个有趣的事情是,当我再次打开其中一个文件时,它不是显示文件顶部,而是准确地在文件消失之前我打开的位置打开。

有人知道这是怎么回事吗?我快速在Google上搜索了文件消失的问题,没有看到与任何错误相关的信息。一些搜索结果与文件实际上从文件夹中消失有关,但在这里并没有发生。文件仍然存在于文件夹中,只是从编辑器视图中消失了。

这是一个已知的错误吗?这可能是一个新错误吗?是否需要更改一些新的设置?还有其他什么可能原因吗?

感谢任何帮助或意见。

英文:

Not sure if this is a bug or if there's a setting I need to adjust, so I'm posting this question in case it's the latter. I just updated my IntelliJ Community Edition to 2022.2.5.

I have my Java project listed in the Project view (it happens with every project I've worked on so far). I'm doing Java work, so I go to the src folder and go through the folders and find a class to work on, say PolicyService.java. I have that open and am looking through it, and may or may not be making changes to it. I then go to my PaymentsService.java and open it, so now I have two classes open and in view (not sure of the name of the window on the screen where you have the file open and are editing them). Then maybe I open a few more (although it happens when I have just one file open also).

Then suddenly, all the files disappear from the view, and the Project view suddenly collapses all the open folders so it looks like I didn't open any folders. Just project-name folder, along with the folders on the same level for External Libraries and Scratches and Consoles.

What's even weirder is what happens to the breadcrumbs in the bar above the Project view and the open file view. It was normal when I had the file open - project-name > src > main > java > com > am > api > appdesk > service > PolicyService > whatever method I was on. But when the file disappears it changes to Sample > sample > sample > sample > sample > sample > sample > sample > sample > sample > (can't remember what it said in place of the method). It stays like that for a few minutes, and then the breadcrumbs disappear.

The other interesting thing is that when I go to open one of the files again, instead of showing the top of the file, the file opens at precisely the point I had it open before it disappears.

Does anybody know what's going on with this? I did a quick Google search on files disappearing from view and didn't see anything about any bugs. A few of the search results that came up had to do with files actually disappearing from the folders themselves, but that's not happening here. The files are still there in the folders, they just disappear from the editor view.

Is this a know bug? Is this potentially a new bug? Is there some new setting I need to change? Is it anything else?

Any help or input is appreciated.

答案1

得分: 0

将文件从云同步管理的文件夹中移出,并从新位置打开项目。云同步软件,如OneDrive和Dropbox,可能会干扰文件系统操作,并删除本地文件以节省空间(仅保留它们的快捷方式,在尝试访问它们时才下载文件)。IDE不适用于无法脱机访问的文件。

英文:

Move your files away from the cloud sync managed folder and open the project from the new location. Cloud sync software such as OneDrive and Dropbox can interfere with the file system operations and remove local files to save space (keeping only shortcuts to them and download the files on the fly when you try to access them). IDE is not designed to work with files that are not available offline.

huangapple
  • 本文由 发表于 2023年7月13日 00:10:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76672547.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定