如何在 Eclipse IDE 中恢复默认透视设置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7703717/
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-10 20:35:05  来源:igfitidea点击:

How to restore default perspective settings in Eclipse IDE

eclipse

提问by user974802

I was playing around with perspectives, such as the Customizing perspective ,I've closed too many windows, and even menu is not visible now . and now would now like to restore the Perspective back to its original state. How do I do this?

我正在玩透视图,例如自定义透视图,我关闭了太多窗口,现在甚至看不到菜单。现在想把透视恢复到原来的状态。我该怎么做呢?

采纳答案by klaus

There is no keyboard shortcut for restoring the perspective directly AFAIK. To open the Window menu (where Reset Perspective resides), try Alt-W. If that does not work, I guess your Eclipse has hung for some reason. Another shortcut you might want to try is F10 (should open the main menu).

AFAIK 没有直接恢复透视的键盘快捷键。要打开“窗口”菜单(重置透视图所在的位置),请尝试 Alt-W。如果这不起作用,我猜你的 Eclipse 出于某种原因挂了。您可能想尝试的另一个快捷方式是 F10(应该打开主菜单)。

回答by matt b

From the Window menu, Reset Perspective

从窗口菜单中,重置透视

回答by Fulltime Programmer

1) Go to "Window".

1) 转到“窗口”。

2) Then click on "Open Perspective",

2)然后点击“打开透视图”,

3) Then click on "Other",

3)然后点击“其他”,

4) Select "Java(Default)" and click "OK"

4) 选择“Java(Default)”并点击“OK”

Then again go to "Window" and click on "Reset Perspective"

然后再次转到“窗口”并单击“重置透视图”

回答by Gerard Brull

The solution that worked for me. Delete this folder:

对我有用的解决方案。删除此文件夹:

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

工作区/.metadata/.plugins/org.eclipse.e4.workbench

回答by Hardy Android

Go Windows -> Perspective -> Reset Perspectivedefinetly this one help you.

转到Windows -> Perspective -> Reset Perspective这绝对可以帮助您。

回答by Paul Nelson Baker

One way is just to revert your settings: If you delete the Metadata folder in your workspace eclipse will revert to its factory state for all settings (both perspective and general).

一种方法是恢复您的设置:如果您删除工作区中的 Metadata 文件夹,eclipse 将恢复其所有设置(透视和常规)的出厂状态。

Source: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka11640.html

来源:http: //infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka11640.html

回答by Dileep

Alt+w-->or click on window tab -->ResetPerspective

Alt+w--> 或单击窗口选项卡-->ResetPerspective

回答by parul sisodia

1 - Go to window . 2 - Go to Perspective and click . 3 - Go to Reset Perspective. 4 - Then you will find Eclipse all reset option.

1 - 转到窗口。2 - 转到透视并单击 。3 - 转到重置透视图。4 - 然后你会发现 Eclipse all reset 选项。

回答by A.K.

In case you are as talented as me and have made the Window menu invisible, there is no way back, as the Customize and Reset Perspective are no longer available. Having good other perspectives do not help, as you only can apparently edit the current perspective only. To get out without nuking all the workspace settings, the following may work:

如果您像我一样才华横溢,并且让窗口菜单不可见,则没有退路,因为自定义和重置透视不再可用。拥有良好的其他视角无济于事,因为您显然只能编辑当前的视角。为了在不破坏所有工作区设置的情况下离开,以下可能有效:

  • Open the file $WORKSPACE_DIR/.metadata/.plugins/org.eclipse.e4.workbench
  • In this XML file, find the element that starts with <persistedState key="persp.hiddenItems"for the perspective in question.
  • This element has an attribute named value, which is a comma-separated list. You may look through the list and manually remove list items from this value which look like they need to be unhidden.
  • There are likely multiple items, so a more practical solution is to delete the whole XML element.
  • 打开文件 $WORKSPACE_DIR/.metadata/.plugins/org.eclipse.e4.workbench
  • 在此 XML 文件中,找到<persistedState key="persp.hiddenItems"相关透视图的开头元素。
  • 该元素有一个名为 的属性value,它是一个逗号分隔的列表。您可以查看列表并手动从此值中删除列表项,这些列表项看起来需要取消隐藏。
  • 可能有多个项目,因此更实用的解决方案是删除整个 XML 元素。

In my case, the offending element appeared close to the beginning of the file:

就我而言,违规元素出现在文件开头附近:

    <children xsi:type="advanced:Perspective" xmi:id="..." elementId="org.eclipse.cdt.ui.CPerspective" selectedElement="..." label="C/C++" iconURI="platform:/plugin/org.eclipse.cdt.ui/icons/view16/c_pers.gif">
  <persistedState key="persp.hiddenItems" value="persp.hideToolbarSC:org.eclipse.jdt.ui.actions.OpenProjectWizard,...,"/>

where some parts were replaced with dots. Obviously, you need to be careful editing machine-generated files. Somebody may be able to write a script.

其中某些部分用点代替。显然,您需要小心编辑机器生成的文件。有人可能会写一个脚本。

Now you can safely lock you out again.

现在您可以安全地再次锁定您。

回答by K. Carpenter

If you still have the "open perspective" button in the top right, you can switch to a different perspective, go to Windows -> Preferences -> General -> Keys, and apply a key binding for "Reset Perspective". Then, switch back to the afflicted perspective and hit that key binding.

如果右上角还有“打开透视图”按钮,可以切换到不同的透视图,进入Windows -> Preferences -> General -> Keys,为“Reset Perspective”应用键绑定。然后,切换回受影响的视角并点击该键绑定。