It can happen to everyone using Eclipse: launching Eclipse with workspace, and then it is stuck loading it. As a last resort, create a new workspace and go on? Possible, but painful, right? For some time I have a strange issue nagging me: from time to time, I’m not able to switch to a workspace which worked before. The IDE starts loading, but then is stuck:
The problem happens to me for multiple versions of Eclipse, including Oxygen (4.7). What I have found out is that it is because of some views open in the workspace, and they somehow might block the Eclipse startup. For example the Processor Expert ‘Component Repository’ view can cause this in Eclipse Neon (4.6) or Oxygen (4.7).
So the usual workaround was to open that workspace with another instance of Eclipse (not having that view), closing that view in the Eclipse Perspective and then I was able to load that workspace again.
Knowing that this has something to do with the perspectives and views, and thanks to a tip (thank you, Livio!), I finally have found the solution to unblock such a workspace :-).
Inside the workspace .metadata folder, there is a file named workbench.xmi:
.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi.
This file stores the perspective window arrangements. So after deleting that file, the IDE windows are reset and I’m now able to load that workspace again :-).
I hope this tip is useful for everyone having such an occasional problem.
Happy Reloading 🙂
Thanks Erich, I wish I’d read this about a year ago!
LikeLike
And I wish I would have found a solution earlier too!
LikeLike
Hi Erich,
It just happened to me again today.
I switched from my laptop back to my desktop – and the workspace is kept in sync because they are both in dropbox.
So I open KDS on my desktop and it shows no projects in my workspace – there should have been about 6. Tried deleting the file you mentioned, but that isn’t the problem.
I tried to start a new workspace and import my existing project, which looks promising, but then I have a problem with getting the debugger up and running – segger seems to give a limited time to enter the processor type (and you have to search thousands). Still seems like I gave it the right one and it doesn’t want to work.
This happens to me every couple of months…
LikeLiked by 1 person
Hi Brynn,
sharing a workspace between different machines is a very, very, very bad idea. I cannot tell how bad this is (beside of DropBox a bad thing too).
The thing is that the .metadata is specific to your machine, and cannot be shared between machines. Bad things will happen (like the one you describe).
You can share the projects, but never the .metadata in it.
I hope this helps,
Erich
LikeLike
Thank you, very helpfull tip!!
LikeLike
That helped me also, thank you!
LikeLike
Thanks a lot.. saved my day
LikeLike
Glad to read that you have found the solution.
LikeLike
Thanks, It worked for me!!!
LikeLike
great 🙂
LikeLike
You saved my day!
LikeLike
ok now this helped me save my time and from a headache
LikeLike
I’m glad to hear that this one helped you 🙂
LikeLike
Reblogged this on rashmizlife and commented:
Ah! Finally a solution to the most commonest of the problems that I face… Much thanks goes to Erich for his article and fix. 🙂
LikeLike
Great, thank you!
LikeLiked by 1 person
This was excellent solution to this annoying problem.
LikeLike
Thanks! It worked for me
LikeLike
Thanks a million!
This issues used to happen to me a lot! I had gone through so many blogs, discussion threads but none helped.I always ended up removing my entire .metadata folder to resolve this. Then I had to set up my workspace from the scratch.
But finally this helped. Thank you again
LikeLike
You are welcome!
Glad you have found the solution. It took me a long time too, and I was not sure how to make sure that the solution can be found.
LikeLike
You’re welcome Erich!
LikeLike
This fix worked for me:
Go to > “Workspaces Preferences”
then Go to > “Startup and Shutdown”
then click on/enable “Refresh workspace on startup”
Or
Go directly to “Startup and Shutdown”
then click on/enable “Refresh workspace on startup”
LikeLike
Hi Terrence,
thanks, that’s indeed an a good way I was not aware of it yet!
LikeLike
You’re welcome Erich!
LikeLike
Thank you! An easy fix that worked great. You’ve saved me from hours of frustration.
LikeLiked by 1 person
Great! Thanks for letting me know.
LikeLike
Thanks man you completely saved my day, I was about to create a complete new workspace with it’s new servers and stuff
LikeLike
Hi Ivan,
great to hear that it was useful for you! All the best!
LikeLike