24

every time I throw away my .metadata (due to some corruption or something) and start with a new one, first thing I do is:

  1. Import my saved preferences
  2. Load existing projects from disk

BUT there are still some things I must configure manually in order to have my setup as I have before, specially in my case (there are probably other things):

  1. I have to add the Perspectives I use and remove the ones I don't
  2. I have to configure the layout of those Perspectives (specially java one, to use properly two monitors).
  3. Add a bugzilla task repostiry for mylyn, and configure a couple of queries

Is there a way to save those thigns so I can load them back when I need? I wish they were stored in preferences...

I am on latest 3.6.

Persimmonium
  • 15,593
  • 11
  • 47
  • 78

3 Answers3

22

Two solutions :

  1. MENU -> File -> Switch workspace -> Other -> Copy Settings of
    • Workbench Layout
    • Working Sets
  2. Copy/backup and replace following folder to new created Workspace.
    • [workspace]/.metadata/.plugins/org.eclipse.ui.workbench/
    • [workspace]/.metadata/.plugins/org.eclipse.core.runtime/.settings/

Personally I prefer (2).

lschin
  • 6,745
  • 2
  • 38
  • 52
  • Cool. I understand 2. but how does 1. exactly works? I tried it and I restarted eclipse in a new empty workspace... – Persimmonium May 13 '11 at 11:31
  • **[Eclipse Doc](http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.user/reference/ref-workspaceswitch.htm)**. I have never used bugzilla plugin of eclipse before. Did configuration of bugzilla worked fine in new Workspace? – lschin May 13 '11 at 11:46
  • 9
    For Eclipse Juno I found what looks like the perspective config in `[workspace]/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi` - nothing relevant in the other two directories mentioned. – Peter Boughton May 31 '13 at 08:56
  • @PeterBoughton Got it right ! it's the only method that works on Juno for me. – Cristiano Fontes Sep 17 '13 at 04:23
  • Eclipse Kepler [workspace]/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi - copies workbench layout and perspectives, and [workspace]/.metadata/.plugins/org.eclipse.core.runtime/.settings/ - copies editor settings – martin jakubik Apr 04 '14 at 12:52
  • 2 doesn't work in eclipse 4.6.2. Antonio's answer works. – Philip Rego Jan 04 '19 at 16:10
  • #2 worked for me. Before copying from the source workspace, close all files in there as otherwise eclipse tries to reload the editor with these files in the target workspace as well - which obviously will fail. – Axel Amthor Aug 03 '19 at 08:33
4

As of Eclipse Neon (and possibly Mars, as well), you can copy the following two directories, to share your workbench and settings/preferences amongst your different workspaces:

    [workspace]/.metadata/.plugins/org.eclipse.core.runtime/.settings
    [workspace]/.metadata/.plugins/org.eclipse.e4.workbench

(Side Note: The Copy Settings dialog would not work for me, as it wouldn't permit me to select either checkbox.)

Antonio Malcolm
  • 314
  • 2
  • 6
1

Good info here - 'Share Eclipse perspective layouts across multiple workspaces'

I use their 'Method #2', listed below.

Method 2: Use Copy Settings

The other method of saving your window layout is to use the Copy Settings feature when switching to another workspace.

  • Open the workspace that contains your customized layout
  • Select File > Switch Workspace > Other… which will open a dialog prompting you for an existing/new workspace
  • Select the workspace, then click the Copy Settings collapsible section
  • Select the Workbench Layout checkbox and click Ok
  • Your workspace will open and should reflect the customised layout of the previous workspace.

Here’s what the dialog looks like:

enter image description here

Give it a shot, quite easy!

J-Dizzle
  • 4,861
  • 4
  • 40
  • 50