Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have created my own perspective in a workspace in Eclipse. But, when I start working on a different workspace I would like to have access to the same perspective. How do I migrate perspective from one workspace to another?

share|improve this question

2 Answers 2

up vote 3 down vote accepted
+100

There are two ways to do this


First Method
This one involves copying files.

Go to your workspace directory and look in this path

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

This directory contains the perspective settings and the workbench layout. Copy this folder and its contents to the workspace(same path) of the other computer.

You might also want to look in

workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/

This directory contains all the settings you have made in the eclipse preferences.

There is an article on this on a blog at How to export eclipse workbench layout (or perspective settings)


Second Method

This can be done using the GUI of eclipse from

File > Export...

eclipse preferences

This will export the preferences to a .epf file, you can then import it in another eclipse workspace from

File > Import...
share|improve this answer

Two methods from Share Eclipse perspective layouts across multiple workspaces :

Method 1: Save the layout as a new perspective

To save your perspective, select Window > Save Perspective As… from the application menu. A dialog should popup (shown below), prompting you for a perspective name. Enter a name that you’ll remember, eg. My Java or Debug Jack. Click Ok once you’ve entered a new name.

Note: You can choose to overwrite one of the default perspectives, eg. Java, without fear. However, I prefer to leave these intact, so always choose a new name, but you can choose whatever works for you.

image

Now you can go through the normal routine of exporting the preferences to a properties file via File > Export > General > Preferences. Then import the same file in another workspace via File > Import > General > Preferences. All you now have to do is switch over to the perspective you saved and all your layout settings will be restored. If you overwrote one of the default perspectives, you may have to select Window > Reset Perspective… to restore the saved settings.

If you’ve chosen to create a new perspective, be sure to point your Run/Debug settings to the new perspective under Window > Preferences > Run/Debug > Perspectives. For example, if you made a new perspective based on the Debug perspective, then you’ll need to change references to the Debug perspective to the My Debug for launchers you use. Luckily this is only required once as these settings are also saved when you export preferences (at least since Eclipse 3.5).

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.

To use this feature, first open the workspace that contains your customised layout. Then 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:

image

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.