Changes

Jump to: navigation, search

Add Menu to RCP Application

579 bytes added, 10:54, 3 March 2011
Add Menu to RCP Application
* Go back to the plugin.xml view and click the Add button. Then select the "org.eclipse.ui.menus" extension and click Finish.
[[Image:rcp-menu-9.png|left|thumb]]<br style="clear:left;" />
* Now, right click on the menus extension and select New -> MenuContribution. Then add the location URI as "menu:org.eclipse.ui.main.menu". You'll get something like this.
[[Image:rcp-menu-10.png|left|thumb]]<br style="clear:left;" />
* Right click on menuContribution and select New -> Menu. Add a menu with the label "File" and the id as File and "fileMenu".
[[Image:rcp-menu-11.png|left|thumb]]<br style="clear:left;" />
* Right click on File(menu) and select New -> command. Then set the commandid, label and tooltip to "cs.ecl.rcp.simple.book.Exit", "Exit" and "Exits the Application".
[[Image:rcp-menu-12.png|left|thumb]]<br style="clear:left;" />
* Save your work and then go back to the Overview tab and click on "Launch an Eclipse application". You should get this.
[[Image:rcp-menu-13.png|left|thumb]]<br style="clear:left;" />
* Congratulations. You're Done!
63
edits

Navigation menu