Tuesday, March 27, 2012

How to add “Perspective Shortcut” or “ViewShortcut” using extension point

  1. Add new Extension Point – “org.eclipse.ui.perspectiveExtensions” in “plugin.xml” file under “Extensions” page.
New Perspective extension point dialog box

  1. Give the targetID* value. This value should be same as your new created perspective id. R-Click on this perspectiveExtension -> New -> viewShortcut
Add new "viewShortcut" under "perspectiveExtension" extension point


  1. Provide the id* value as “org.eclipse.ui.console.ConsoleView” to add shortcut of Console View in your perspective.
Add new view shortcut of Console view

  1. Add new “perspectiveShortcut” under “perspectiveExtension” and give any existing perspective id* value like: “org.eclipse.pde.ui.PDEPerspective” (Plug-in Perspective ID).
Add new perspective shortcut of "Plug-in Development"

  1. Run the project.
  2. Now you can found a new view shortcut of Console is added under “Window -> Show View” menu.
Console view shortcut menu

  1. Also found the new shortcut menu of Plug-in development perspective under “Window -> Open Perspective” menu.
Add new menu shortcut of "Plug-in Development" perspective

Attachment: To Download this project click here.

No comments:

Post a Comment