7

While dragging the perspective tool bar to a different place in eclipse Juno, my eclipse got hang, and after restarting eclipse, the perspective bar gone.

I tried googling but didnt find a solution to display that bar again. Anyone got a solution?

sufyan.shoaib
  • 1,117
  • 9
  • 19

4 Answers4

17

There is actually no need to reset your perspective, let alone to nuke your workbench.xmi memo file. There is a smarter way:

  1. Open a new workbench window. From the main menu: Window => Ǹew Window. Please note that the new window does have the (already customized) Perspective Bar.

  2. Close the window that does not have the Perspective Bar first.

  3. Close the second window. This will save a cleaner version of workbench.xmi (overriding the one that has a perspective bar positioned out of the screen).

  4. Reopen eclipse. The Perspective Bar is back at its place.

Alain Pannetier
  • 9,315
  • 3
  • 41
  • 46
  • Thanks, nice elegant solution that worked (using Juno and PDT) – DaveStSomeWhere Apr 05 '14 at 13:35
  • Nicely done but this reset the view (not a big deal). Used on Juno. – Nereis Apr 24 '15 at 05:45
  • No luck in neon.3 ... The newly opened window did have the perspective buttons, but after closing it down last and then restarting Eclipse my perspective was reset and there were still no perspective buttons! – Roger Apr 26 '17 at 16:44
  • Followup to my earlier comment ... Here's how I managed to fix it (along with deleting workbench.xmi): http://stackoverflow.com/a/43645693/558193 – Roger Apr 26 '17 at 22:42
  • This suggestion appears to have the same effect as resetting the perspective. The views are back in the same place as when resetting the perspective, views I'd previously opened and positioned etc are gone... – Dan Gravell Jan 26 '21 at 10:11
10

There are two things you can try:

  1. Reset your current perspective (Window/Reset perspective...). Although your configured set of views will get lost, it might bring back the perspective switcher.
  2. If that does not work, then you should reset the entire saved workbench GUI. This can be done by deleting the .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi file from your workspace folder, or by starting eclipse with the -clearPersistedState

Point 2. assumes, that in case of Juno you are using Eclipse 4.2 (the new GUI, not 3.8, the old).

Zoltán Ujhelyi
  • 13,788
  • 2
  • 32
  • 37
0

First of all let me say: I will quit of using Eclipse as soon as putting perspective menu to left will be impossible (and force my team to do so as well).

As workaround I do the following for every new workspace

  1. Create workspace
  2. Close eclipse
  3. Override .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi by stashed file.

I made stashed workbench.xmi this way:

  1. Create workspace in 3.8, configure bar at left
  2. Open this workspace in 4.* (it will create stashed file).
  3. Close eclipse
  4. Stash workbench.xmi.
0

At least on eclipse 2019-06 (4.12.0), it's enough to

"switch workspace"->"Other"->"Recent Workspaces"->(The same you're on)

Alim Özdemir
  • 2,396
  • 1
  • 24
  • 35