开发者

How to restore default perspective settings in Eclipse IDE

开发者 https://www.devze.com 2023-04-12 06:38 出处:网络
I was playing around with perspectives, such as the Customizing perspective,I\'ve closed too many windows, and even menu is not visible now .

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 or开发者_StackOverflow中文版iginal state. How do I do this?


From the Window menu, Reset Perspective


1) Go to "Window".

2) Then click on "Open Perspective",

3) Then click on "Other",

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

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


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


The solution that worked for me. Delete this folder:

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


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


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

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


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


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


For restore the default perspective settings in eclipse/STS IDE, Go to Windows -> Perspective -> Reset Perspective

How to restore default perspective settings in Eclipse IDE


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.


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.

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.


Go to windows->perspective->Reset Perspective->Default Perspective

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号