如何修复在Eclipse中不再打开的工作空间(因为EGit的原因)?

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

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

问题

以下是翻译好的内容:

我的Eclipse工作空间不再打开。Eclipse开始启动,然后...什么都没有。以下是我的日志:

!ENTRY org.eclipse.egit.ui 2 0 2020-10-26 22:14:42.055
!MESSAGE 警告:环境变量HOME未设置。以下目录将用于存储Git用户全局配置并定义存储存储库的默认位置:'C:\Users\xav_m'。如果这不正确,请设置HOME环境变量并重新启动Eclipse。否则,Git for Windows和EGit可能因为它们看到不同的配置选项而表现不同。可以在Team > Git > Confirmations and Warnings首选页面上关闭此警告。
!ENTRY org.eclipse.ui.workbench 4 0 2020-10-26 18:34:52.194
!MESSAGE FrameworkEvent 错误
!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)

我几周前安装了GitBash,但以前从未使用过,除了配置我在GitHub帐户上使用的用户名和电子邮件地址。我还没有创建本地存储库。
我几周前安装了Egit插件,没有使用过,并在今天进行了更新。自从这次更新后,当我尝试启动Eclispe时,我收到了上面的消息。

我尝试将变量Home更改为值“%USERPROFILE%”,只是为了测试,但我收到了以下消息:

!ENTRY org.eclipse.ui.workbench 4 0 2020-10-26 18:29:50.338
!MESSAGE FrameworkEvent 错误
!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)

与关于git的消息相同,没有git的消息。
我创建了一个名为“git”的本地存储库,并在我的用户文件夹中初始化了它,但没有成功。
我应该卸载GitBash吗?还是删除我工作空间中的.metadata文件夹?
感谢您的帮助。

英文:

My Eclipse workspace doesn't open anymore. Eclipse started to launch , then..nothing.
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. I haven't created a local repository yet.
I installed Egit plugin few weeks ago, without used it, and updated it today. Since this update, when I try to launch Eclispe,I have the message above.

I tried to change the variable Home with value "%USERPROFILE%" , just to see, but I had the following message:

!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.
Should I desinstall GitBash? Or remove the .metadata in my worskpace?
Thank you for your help

答案1

得分: 1

好的,经过一些研究,我尝试了以下方法,并且它对我有效:
前往.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi并删除workbench.xmi

现在Eclipse可以工作了,但是当然我不知道为什么。
如果有人有一点线索,我会接受的 如何修复在Eclipse中不再打开的工作空间(因为EGit的原因)?

英文:

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

And Eclipse works now, but of course I don't why.
If someone has a little clue, I take it 如何修复在Eclipse中不再打开的工作空间(因为EGit的原因)?

答案2

得分: 0

不要尝试恢复工作区。创建一个新的工作区。如果你所有的项目都存储在远程 git 仓库中,只需从你的本地仓库重新导入这些项目(尽管不清楚你是否曾经克隆过仓库)。如果其中任何项目不存储在 git 中,而是存储在本地磁盘上的本地目录中,那么只需从这些位置重新导入(即使该位置在原始工作区内部)。

英文:

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). 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).

huangapple
  • 本文由 发表于 2020年10月27日 06:09:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/64545666.html
匿名

发表评论

匿名网友

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

确定