如何删除已卸载插件的 Eclipse 透视图?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/892203/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:43:40  来源:igfitidea点击:

How do I delete an Eclipse perspective for a plugin I uninstalled?

eclipse

提问by Nik Reiman

I was evaluating the Enterprise IDE plugin for Eclipse, and ultimately decided not to purchase it. After I uninstalled the plugin, I was left with a bunch of perspective buttons (the ones in the far upper-right-hand corner) which I can't remove. How do I get rid of the manually, without nuking my workspace?

我正在评估 Eclipse 的 Enterprise IDE 插件,最终决定不购买它。卸载插件后,我留下了一堆无法删除的透视按钮(位于最右上角的那些)。如何在不破坏我的工作区的情况下手动摆脱?

Edit: To be clear, right-clicking and going to "close" does nothing. Not even an error message.

编辑:要清楚,右键单击并“关闭”什么都不做。甚至没有错误信息。

回答by Eightball

Click Window ? Preferences ? General ? Perspectives. Select the perspective you want to delete and remove it. Some of them are unremovable. I don't know why.

单击Window ? Preferences ? General ? Perspectives。选择要删除的透视图并将其移除。其中一些是不可移除的。我不知道为什么。

回答by VonC

How did you uninstall that plugin ?

你是怎么卸载那个插件的?

As Danieldetails in his answer, Help-> Install new software-> click on "Whats already installed?"is the right way to uninstall a plugin, and should get rid of the perspective as well.

正如丹尼尔他的回答中详细说明的那样,Help-> Install new software-> 单击"Whats already installed?"是卸载插件的正确方法,并且也应该摆脱透视图。

If the plugin was installed in the dropinsdirectory or in <eclipse>/pluginsand <eclipse>/features, did you delete all directories/jarin <eclipse>/features, because if that plugin was packaged as a product, it did define in the product extension pointa plugin_customization.iniwhich can indicate some perspective buttons.

如果插件被安装在dropins目录中,或<eclipse>/plugins<eclipse>/features,并删除所有directories/jar<eclipse>/features,因为如果该插件被打包成一个产品,它没有在定义产品扩展点一个PLUGIN_CUSTOMIZATION.INI可能表明一些观点按钮。

If not, the only solution is to have a careful look at your workspace metadata, look for all recent file related to that plugin and remove them.
Make a copy of your workspace first though.

如果没有,唯一的解决方案是仔细查看您的工作区元数据,查找与该插件相关的所有最新文件并将其删除。
不过,请先复制您的工作区。

As an example of such a careful look at your workspace metadata", user900975points out in his answerthe <your workspace folder>/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xmlfile, with <perspectives>element and <perspective>child elements that you can remove.

作为仔细查看您的工作区元数据的一个示例”,user900975他的回答中指出了该<your workspace folder>/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml文件,其中包含您可以删除的<perspectives>元素和<perspective>子元素。



Note: Eightballmentions in his answer(upvoted) the possibility to list and delete a perspective.

注意:Eightball他的回答中提到(赞成)列出和删除观点的可能性。

delete perspective

删除视角

Since he mentions "Some of them are un-removable. I don,t know why", my original answer above still stands.

既然他提到“其中一些是不可移动的。我不知道为什么”,我上面的原始答案仍然有效。



Alexandrosadds in the comments:

亚历山德罗斯在评论中补充道:

This helped me fix this, but in my case the file I had to edit while Eclipse was closed was:

.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi

这帮助我解决了这个问题,但就我而言,在 Eclipse 关闭时我必须编辑的文件是:

.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi

回答by Nik Reiman

I was suffering the same problem with a left-over perspective button for SVN repository Exploring. It wouldn't disappear using the close option. However it did disappear after selecting from Window -> Close All Perspectives.

我在 SVN 存储库探索的左侧透视按钮上遇到了同样的问题。使用关闭选项它不会消失。然而,它在从 Window -> Close All Perspectives 中选择后确实消失了。

Regards,

问候,

回答by John Amos

<your workspace folder>/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml contains a <perspectives> element with <perspective> child elements. You can delete <perspective> elements and they will no longer appear in the toolbar. Eclipse writes to this file when it exits so your changes will be overwritten if you don't quit Eclipse first.

<您的工作区文件夹>/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml 包含一个带有 <perspective> 子元素的 <perspectives> 元素。您可以删除 <perspective> 元素,它们将不再出现在工具栏中。Eclipse 会在退出时写入此文件,因此如果您不先退出 Eclipse,您的更改将被覆盖。

回答by Daniel

If you installed a plugin, click Help ? Install new software, then click What's already installed?in the bottom right. Uninstall what you want, the perspective will be removed as well.

如果您安装了插件,请单击Help ? Install new software,然后单击What's already installed?右下角的。卸载你想要的,透视也将被删除。

回答by Anonymous coward

I had the same problem after installing a plugin. The answer is quite simple, if not obvious.

安装插件后我遇到了同样的问题。答案很简单,如果不是很明显的话。

  1. Open Window | Preferences
  2. Click General node
  3. Click Perspectives
  1. 打开窗口 | 喜好
  2. 单击常规节点
  3. 点击视角

Find the perspective in the list and then select Delete command on the right.

在列表中找到透视图,然后选择右侧的删除命令。

The list will refresh and your perspective is deleted.

该列表将刷新并删除您的视角。

回答by Zsolt T?r?k

You could also try launching Eclipse with the -cleancommand line argument. This cleans out the Eclipse runtime cache, so it might fix your problem as well.

您还可以尝试使用-clean命令行参数启动 Eclipse 。这会清除 Eclipse 运行时缓存,因此它也可能解决您的问题。