文件夹和文件不会出现在Eclipse IDE中的PHP Explorer中 [英] Folders and files don't appear in PHP Explorer in Eclipse IDE

查看:222
本文介绍了文件夹和文件不会出现在Eclipse IDE中的PHP Explorer中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse IDE中使用PHP开发工具。我重构了一些脚本到PHP项目的新文件夹。现在,没有重构的文件夹或文件显示在PHP资源管理器视图中,尽管它们存在于文件系统中。



移动或重命名文件后,会出现问题。我发送错误报告给Eclipse技术支持,但到目前为止他们还没有解决。



有根本的解决方案 - 重新创建工作区,但是它太贵了所有我的设置,重新导入所有项目,恢复所有工作集等。



上述所有内容在我的开发工作中引起很大的不适。所以我决定尝试自己解决它,因为有唯一的Eclipse工作区,可以隐藏一个bug。



我在文件系统上进行了简单的搜索,发现了三个提到我的PHP项目名称的文件:




  • workspace / .metadata / .plugins / org.eclipse.dltk.core.index.sql.h2 / model.h2.db

  • workspace /。元数据/ .plugins / org.eclipse.ui.workbench / workingsets.xml

  • workspace / .metadata / .plugins / org.eclipse.e4.workbench / workbench.xmi



删除sqlite数据库没有什么 - 在重新启动Eclipse恢复的数据库文件后,但我没有看到我的文件在新位置。



然后我删除了workingsets.xml文件并重新启动了Eclipse - 并且lo!我的文件和文件夹现在出现在PHP资源管理器中。但事实是,我所有的工作集也删除了...无论如何,删除和恢复整个工作空间都不错。虽然使用工作集对我来说非常重要 - 我在PHP和Java上使用了许多不同的项目,我们都喜欢分类。



真的会陷入问题的核心,但似乎Eclipse在工作集中被放置在正确的PHP项目后无法正常工作。我认为这是一个错误。



等待看看事情将如何工作。但是也许有人有解决方案吗?

解决方案

对于我来说,这发生了多次,在不同的项目和不同的文件夹。打开+关闭或刷新项目没有成功。



在我的情况下,我发现这与工作集有关。默认情况下,项目的新子文件夹和文件似乎没有被标记为属于该集合,因此该项目混合了旧文件夹(包括)和新文件夹(不包括)。



要解决这个问题,您可以禁用工作集或编辑活动的工作集,并检查项目的复选框(将检查所有子文件夹)。



奖金提示:在大型项目中,使用这种混合状态工作集打开文件夹结构(和其他操作)非常慢(每级3-5秒)。关闭工作组过滤器即可实现。


I use PHP Development Tools in Eclipse IDE. I did refactoring and move some scripts to the new folders of PHP project. Now no refactored folders or files are displayed in PHP Explorer View although they are present in the file system.

The problem occurs regularly after moving or renaming files. I sent bug report to Eclipse technical support but so far they have not solved it.

There is radical solution - to re-create the workspace, but then it's too expensive restore all my settings, reimport all projects, restore all working sets, etc.

All described above causes a lot of discomfort in my development work. So I decided to try to resolve it myself, because there is the only Eclipse workspace and a bug can be hidden within it.

I make a simple search on the file system and found three files that mention the name of my PHP project:

  • workspace/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/model.h2.db
  • workspace/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
  • workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi

Removing sqlite database yielded nothing - after restarting Eclipse recovered db file, but I didn't saw my files in new location.

Then I deleted workingsets.xml file and restarted Eclipse - and lo! My files and folders now appear in the PHP explorer. But the truth is that all my working sets also deleted... In any case it's better than to remove and restore the whole workspace. Although using of working sets is very important for me - I work with a lot of different projects on PHP and Java, and I love when they all are classified.

I don't really go into the heart of the problem, but it seems that Eclipse can't work with the PHP projects correctly when they are placed in the working sets. I think it is a bug in this.

Wait and see how things will work on. But maybe anybody has a solution?

解决方案

For me this happened multiple times, on different project and different folders. Opening+closing or refreshing the project yield no success.

In my case, I have found out that this is related to the Working sets. It seems by default new subfolders and files of a project are not marked belonging to the set, so the project has a mix of old folders (included) and new folders (excluded).

To fix this, you can disable the working sets or edit the active working set and check the project's checkbox (which will check all subfolders).

Bonus tip: on large projects, having this mixed state working set made opening the folder structure (and other operations) very slow (3-5 seconds per level). Turning off the working set filter made it instantaneous.

这篇关于文件夹和文件不会出现在Eclipse IDE中的PHP Explorer中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆