Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » contribution to Papyrus perspective(using extension org.eclipse.papyrus.ui.perspectiveconfiguration)
contribution to Papyrus perspective [message #705054] Fri, 29 July 2011 11:25 Go to next message
A Vernotte is currently offline A VernotteFriend
Messages: 21
Registered: June 2011
Junior Member
Hi,

I created my own menu and toolbar, and I can see them unless the papyrus perspective is active. A solution was submitted in a previous post, i.e. using org.eclipse.papyrus.ui.perspectiveconfiguration to configure papyrus perspective in order to add menus and toolbar IDs to it. But I can't make it work. Both menu and toolbar don't show up.

Below a part of my plugin.xml :

<extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="menu:org.eclipse.ui.main.menu">
         <menu
               id="my.own.menu"
               label="My Own Menu">
            <command
                  commandID="my.own.command.first"
                  label="First Item"
                  style="push">
            </command>
            <command
                  commandID="my.own.command.second"
                  label="Second Item"
                  style="push">
            </command>
         </menu>
      </menuContribution>
      <menuContribution
            locationURI="toolbar:org.eclipse.ui.main.toolbar">
         <toolbar
               id="my.own.toolbar">
            <command
                  commandId="my.own.command.first"
                  icon="icons/td_check.png"
                  label="First Item"
                  style="push">
            </command>
            <command
                  commandId="my.own.command.second"
                  icon="icons/td_logo.png"
                  label="Second Item"
                  style="push">
            </command>
         </toolbar>
      </menuContribution>
   </extension>

<extension
         point="org.eclipse.ui.commands">
      <command
            categoryId="my.own.category"
            defaultHandler="my.own.command.FirstHandler"
            id=""my.own.command.first"
            name="First Item">
      </command>
      <command
            categoryId="my.own.category"
            defaultHandler="my.own.command.SecondHandler"
            id="my.own.command.second"
            name="Second Item">
      </command>
      <category
            id="my.own.category"
            name="MyOwnCategory">
      </category>
   </extension>


I tried several technics, here they are :

First, with keeping the example from the previous post
 <extension
         point="org.eclipse.papyrus.ui.perspectiveconfiguration">
      <configuration
            perspectiveID="org.eclipse.papyrus.core.perspective">
         <menu
               menuID="file">
         </menu>
         <menu
               menuID="edit">
         </menu>
         <menu
               menuID="org.eclipse.papyrus.ui.menu">
         </menu>
         <menu
               menuID="my.own.menu">
         </menu>
         <menu
               menuID="window">
         </menu>
         <menu
               menuID="help">
         </menu>
         <toolbar
               toolbarID="my.own.toolbar">
         </toolbar>
         <toolbar
               toolbarID="org.eclipse.papyrus.diagram.ui.toolbar">
         </toolbar>
         <preferencePage
               preferencepageID="org.eclipse.papyrus.preferences.generalcategory">
         </preferencePage>
         <category
               categoryID="org.eclipse.ui.category.file">
         </category>
         <category
               categoryID="org.eclipse.ui.category.edit">
         </category>
         <category
               categoryID="org.eclipse.ui.category.help">
         </category>
         <category
               categoryID="org.eclipse.papyrus.editor.category">
         </category>
         <category
               categoryID="my.own.category">
         </category>
      </configuration>
   </extension>


Second, with starting from scratch
<extension
         point="org.eclipse.papyrus.ui.perspectiveconfiguration">
      <configuration
            perspectiveID="org.eclipse.papyrus.core.perspective">
         
         <menu
               menuID="my.own.menu">
         </menu>
          <toolbar
               toolbarID="my.own.toolbar">
         <category
               categoryID="my.own.category">
         </category>
      </configuration>
   </extension>


Also I tried without declaring "my.own.category", didn't change a thing.

Any Idea why this is not working ? Thank you.
Re: contribution to Papyrus perspective [message #834800 is a reply to message #705054] Mon, 02 April 2012 12:14 Go to previous message
Alexandra Bardiau is currently offline Alexandra BardiauFriend
Messages: 21
Registered: March 2012
Junior Member
Hi,

I realize you might have found a solution by now, but just in case, I think this might help:

stackoverflow.com/questions/4335458/eclipse-plug-in-add-launch-command-group-to-custom-perspective

Cheers!
Previous Topic:can't resize Combined Fragment
Next Topic:Problem with SysML diagrams
Goto Forum:
  


Current Time: Sun Nov 23 11:11:37 GMT 2014

Powered by FUDForum. Page generated in 0.02106 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software