How to open a view using the eclipse-rcp's plugin.xml's Extension Tab. Passing the view ID as a command parameter.
Tech-Today

How to open a view using the eclipse-rcp's plugin.xml's Extension Tab. Passing the view ID as a command parameter.


1.) Create a new HelloWorld RCP project
2.) Open the plugin.xml file and click the Extension tab
3.) Add the extension org.eclipse.ui.commands
a.) right click and select New->command
b.) set the command's id to command.showView
c.) set the defaultHandler to org.eclipse.ui.handlers.ShowViewHandler
4.) Add a parameter to the command
a.) right click the command.showView
b.) select New->commandParameter
c.) set its id to org.eclipse.ui.views.showView.viewId
d.) name=viewId
e.) values=org.eclipse.ui.internal.registry.ViewParameterValues

5.) Now we need to create the menu
a.) add the extension org.eclipse.ui.menus
b.) right click and select New->menuContribution
c.) sets the locationURI=menu:org.eclipse.ui.main.menu
6.) Attach the command to the menu
a.) right click the menuContribution select New->command
b.) sets the commandId=org.irri.jicis.administration.command.showView
c.) label=Show View
7.) Add a parameter to the menu
a.) right click the "Show View" command, select New->parameter
b.) set the name=org.eclipse.ui.views.showView.viewId
c.) value=an existing view id (I assume you already know how to create a view with a view id)
hint: add an extension org.eclipse.ui.views




- Add Eclipse-rcp's Views Short List, Perspective Short List In The Org.eclipse.ui.menus Plugin Via Dynamic Compoundcontributionitem Class
Recently, I've encountered a problem wherein I wanted to display the eclipse-rcp's list of view, perspective etc using the extension org.eclipse.ui.menus. The problem can easily solved by the ApplicationActionBarAdvisor, see the code below: private...

- How To Show Dynamic Command Based On Perspective In Eclipse-rcp, Does Not Work On Toolbar And Main Menu
1.) Using the HelloWorld project template, add org.eclipse.core.expressions in your application's plugin.xml's Dependencies tab. 2.) In the extension tab do the following: a.) add org.eclipse.core.expressions.definition, set its id to onValidationPerspective...

- Menu Contribution Location In Eclipse-rcp
There are 3 main location where a menu can be added (Menu Codes): 1.) menu - menu:org.eclipse.ui.main.menu 2.) toolbar - toolbar:org.eclipse.ui.main.toolbar 3.) popup - popup:org.eclipse.ui.popup.any To add a menu: 1.) open plugin.xml 2.) go to extension...

- Execute An Eclipse-rcp Command And Open An Eclipse-rcp View In Code
Objective: 1.) To execute an eclipse rcp command in code 2.) To open an eclipse rcp view in command Most of the time you will just use the extension tab in the plugin.xml but for those who chose to implement in code here's how they're done: Solution:...

- How To Add And Enable A Menu Button Using The Eclipse Rcp Extension (by Code And Using The Plugin Ui Interface)
How to add and enable a menu button using the eclipse rcp extension (by code and using the plugin UI Interface) To learn eclipse-rcp, I keep on reading, try some tutorials available on the net. My favorite is this one: http://www.vogella.de/articles/RichClientPlatform/article.html,...



Tech-Today








.