简体   繁体   English

如何修复 Eclipse 中不再打开的工作区(因为 EGit)?

[英]How to fix a workspace in Eclipse that does not open anymore (because of EGit)?

My Eclipse workspace doesn't open anymore.我的 Eclipse 工作区不再打开。 Eclipse started to launch, then..nothing. Eclipse 开始发射,然后..什么都没有。 Here is my log:这是我的日志:

!ENTRY org.eclipse.egit.ui 2 0 2020-10-26 22:14:42.055
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\xav_m'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
!ENTRY org.eclipse.ui.workbench 4 0 2020-10-26 18:34:52.194
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.lang.NullPointerException
    at org.eclipse.ui.internal.AbstractWorkingSetManager.getUniqueDescriptors(AbstractWorkingSetManager.java:685)
    at org.eclipse.ui.internal.AbstractWorkingSetManager.bundleChanged(AbstractWorkingSetManager.java:632)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:973)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

I installed GitBash few weeks ago but never used it before, except to config my user name and email address used on my GitHub account.我几周前安装了 GitBash,但之前从未使用过它,除了配置我的用户名和 GitHub 帐户上使用的 email 地址。 I haven't created a local repository yet.我还没有创建本地存储库。 I installed Egit plugin few weeks ago, without used it, and updated it today.我几周前安装了 Egit 插件,但没有使用它,今天更新了它。 Since this update, when I try to launch Eclispe,I have the message above.自此更新以来,当我尝试启动 Eclispe 时,我收到了上面的消息。

I tried to change the variable Home with value "%USERPROFILE%", just to see, but I had the following message:我试图用值“%USERPROFILE%”更改变量 Home,只是为了看看,但我收到以下消息:

!ENTRY org.eclipse.ui.workbench 4 0 2020-10-26 18:29:50.338
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.lang.NullPointerException
    at org.eclipse.ui.internal.AbstractWorkingSetManager.getUniqueDescriptors(AbstractWorkingSetManager.java:685)
    at org.eclipse.ui.internal.AbstractWorkingSetManager.bundleChanged(AbstractWorkingSetManager.java:632)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:973)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

Means the same message, without the message about git. I created a local repository "git" and init it in my folder user, it didn't work.表示相同的消息,但没有关于 git 的消息。我创建了一个本地存储库“git”并在我的文件夹用户中初始化它,它没有用。 Should I desinstall GitBash?我应该卸载 GitBash 吗? Or remove the.metadata in my worskpace?或者删除我工作区中的元数据? Thank you for your help谢谢您的帮助

Ok, after few research, I tried the following and it worked for me: Go to.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi and remove workbench.xmi好的,经过一些研究,我尝试了以下方法并且它对我有用:Go to.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi 并删除 workbench.xmi

And Eclipse works now, but of course I don't why.和 Eclipse 现在工作,但我当然不知道为什么。 If someone has a little clue, I take it:)如果有人有一点线索,我会接受:)

Don't attempt to recover the workspace.不要尝试恢复工作区。 Create a new workspace.创建一个新的工作区。 If all of your projects are stored in a remote git repository, just reimport the projects from your local repository (although it's not clear whether you've ever cloned a repository).如果您的所有项目都存储在远程 git 存储库中,只需从本地存储库重新导入项目(尽管不清楚您是否曾经克隆过存储库)。 If any of the projects are not stored in git, but in local directories on the local disk, then just reimport from those locations (even if that location is within the original workspace).如果任何项目未存储在 git 中,而是存储在本地磁盘的本地目录中,则只需从这些位置重新导入(即使该位置在原始工作区内)。

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

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