[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Adding perspective shortcuts from plugins

Hi Rakesh,

I'm not totally sure whether this is what you need but it is possible to
add a perspective shortcut to a specific target perspective (of your
existing RCP application) through the
"org.eclipse.ui.perspectiveExtensions" extension point in your plugin.xml file.
Assuming the perspective you want to contribute has the ID
"my.perspective.id" and the perspective to which you want to add the
perspective shortcut has the ID "target.perspective.id", the following
extension should do the trick:


   <extension
         point="org.eclipse.ui.perspectiveExtensions">
      <perspectiveExtension
            targetID="target.perspective.id">
         <perspectiveShortcut
               id="my.perspective.id">
         </perspectiveShortcut>
      </perspectiveExtension>
   </extension>

Hope this helps,
Ovidio

Rakesh TA wrote:
I am creating a plugin that contributes a new perspective to an Eclipse RCP application. I want to add the perspective shortcut to the perspective bar (and to Window -> Open Perspective menu).

I can't use IPageLayout#addPerspectiveShortcut(String) as the page layout object is available only in the perspective's 'createInitialLayout' method.
Is there any other way that I add a shortcut on the perspective bar?


Thanks,
Rakesh