Eclipse working set is missing

2020-08-14 02:20发布

问题:

My Eclipse crashed, and a working set which I'd just spent an hour setting up is now missing.

But when I try and create a new working set with the same name, it says "A working set with that name already exists."

So if it exists, where is it? I can't find it in my workspace... If it doesn't exist, why can't I create a new one of the same name?

I've tried refreshing my workspace (F5), and running ./eclipse -clean - no joy.

回答1:

A little hack solved it :)
(Eclipse Java EE IDE for Web Developers, Version: Indigo Service Release 1)

  1. Choose a project, right click on it.

  2. Assign Working Sets...

  3. In Working Set Assignments window: uncheck the checkbox called "Show only Package Explorer working sets" ... and voila: there is the disappeared working set.

  4. Check that working set and Click "OK" -> Working set will appear in Package Explorer.



回答2:

Another possibility is to click the arrow pointing down (View Menu), select top level element and then choose Working sets.



回答3:

Neither of the above answers worked for me on STS 3.4.2. I kept getting the error "workspace of that name already exists" when I tried to create a specific name although I could not see it in the package viewer.

I found this file that contains references to the named workspaces:

<workspace dir>/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml

I noticed that the missing workspace had a

 editPageId=org.springframework.ide.eclipse.ui.springWorkingSetPage

whereas the ones I could see were:

editPageId=org.eclipse.jdt.ui.JavaWorkingSetPage

So, my 'missing' working set would only show up in the spring package viewer. User error - but eclipse did not help find it...

At this point one can either rename/delete the spring workspace, then add it to the package workspace.



回答4:

In my case I had to:

  • Right click on a project > "Assign Working Sets..."
  • "Configure Package Explorer working sets..."
  • Select the missing working sets and click OK

Et voilà!



回答5:

I solved my problem by closing then reopening Navigator view.



回答6:

Thanks all for the hints. While they didn't exactly work as it did for some of you, here's what worked for me (using Eclipse Juno):

File -> Import -> Existing Projects into Workspace -> Select the directory from where to import your project(s) -> Finish.

Not sure what the specific cause was, though it happened when my machine crashed.



标签: eclipse