繁体   English   中英

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

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

我几周前安装了 GitBash,但之前从未使用过它,除了配置我的用户名和 GitHub 帐户上使用的 email 地址。 我还没有创建本地存储库。 我几周前安装了 Egit 插件,但没有使用它,今天更新了它。 自此更新以来,当我尝试启动 Eclispe 时,我收到了上面的消息。

我试图用值“%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)

表示相同的消息,但没有关于 git 的消息。我创建了一个本地存储库“git”并在我的文件夹用户中初始化它,它没有用。 我应该卸载 GitBash 吗? 或者删除我工作区中的元数据? 谢谢您的帮助

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

和 Eclipse 现在工作,但我当然不知道为什么。 如果有人有一点线索,我会接受:)

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

暂无
暂无

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

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