13

If I have two versions of Eclipse installed, how do I add a perspective that I've installed in one [version of eclipse] to the other? How do perspectives get added in the first place? I.e., where do they come from (don't tell me "the 'Open Perspective' dialog")?

3 Answers 3

18

Since the chosen answer is a little bit "poor" on the details on "where do the perspectives come from", here are some precisions:

A perspective in Eclipse is really just a named organization of views, menus, and toolbars that can be saved and switched to - a unique tab of the application organized for a particular task or set of tasks.

So a perspective comes either from:

  • you: you can modify any perspective, adding view, removing menus, adding toolbars, ... and then saving the result (the current modified perspective) under a new name.

alt text http://www.javalobby.org/images/postings/rj/eclipse_perspective/1.gif

  • a plugin: for that, a plugin declares a extension point for perspective contribution: org.eclipse.ui.perspectives. A new perspective is added to the workbench by defining an extension for this point. In the example below a perspective extension is defined for the Test Perspective. This declaration contains the basic elements: id, name and class.

A complete description of the extension point and the syntax are available in the developer documentation for org.eclipse.ui. The attributes are described as follows.

  • id - a unique name that will be used to identify this perspective.
  • name - a translatable name that will be used in the workbench window menu bar to represent this perspective.
  • class – a fully qualified name of the class that implements org.eclipse.ui.IPerspectiveFactory interface.
  • icon - a relative name of the icon that will be associated with this perspective.

This extension point is used to add perspective factories to the workbench.
A perspective factory is used to define the initial layout and visible action sets for a perspective. The user can select a perspective by invoking the "Open Perspective" submenu of the "Window" menu.


This is why copying a plugin from one installation of eclipse into the dropin folder of the other eclipse will make the perspective available to your second Eclipse installation.
(As the last link suggests, you could define a plugin bundle location in order for your two Eclipse to share a common bundle of plugins).

More details on the transfer of plugins between diffent Eclipse (of different versions) in this SO question "How Do You Reinstall Installed Eclipse Plugins?".

3
  • where can the above drop down menu be accessed? it does not show up on the toolbar for me.
    – ylun
    Apr 10, 2014 at 1:42
  • @ylun.za in five years, the design may have changed. You can see similar buttons with Java or debug at stackoverflow.com/q/18635291/6309. This one is seen when right clicking on one of those perspective buttons.
    – VonC
    Apr 10, 2014 at 5:36
  • Yes i have since found it. The settings are now located under the Window drop-down menu.
    – ylun
    Apr 10, 2014 at 12:26
1

Eclipse perspectives are usually defined by features / plugins. If you are missing a certain perspective check the list of installes features / plugins.

2
  • Sure, but what if I have a plugin already installed in one eclipse -- how do I get it to the other?
    – Joe
    Mar 9, 2009 at 20:37
  • 1
    you would have to install that plugin in your other instance of eclipse. The safest way to do this would be via that plugins update site.
    – nstehr
    Mar 9, 2009 at 20:42
0

Editors and other plug-ins might add their own perspectives. You can also create and save your own perspectives, but I believe you're asking about perspectives added by plug-ins.

The solution is to install the same plug-ins.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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