java - RCP application display menus listed in ApplicationActionBarAdvisor -
I need some help in displaying menus in my RCP application. I think there are two ways to display the menu
1 & lt; Extention point & gt; By specifying the Plugin.xml 2. By applying the menu in ApplicationActionBarAdvisor.java.
I am able to see the menu specified in the plugin .xml file, but unable to see anyone specified in the ApplicationActionBarAdvisor. The Java class specifies me in the plug.xml to reflect it Is there a requirement? Below is the code in the application actionbara adver
public class ApplicationActionBarAdvisor Extends ActionBarAdvisor {Private IWorkbenchAction saveAction; Private IWorkbenchAction saveAsAction; Private IWorkbenchAction introAction; Private Menu Manager new menu; // // Actions - It is important to allocate them only in the operation, and then use // // in the methods of filling. This ensures that the actions are not reproduced / when the fillActionBars are called with FILL_PROXY, the Public Action Airebrier Advisor {Super (Configurator); } Public Zero Make Action (IWorkbenchWindow Window) {This alert action = action feature. SAV.Kreate (window); this. Registry (This Action Alert); This.saveAsAction = ActionFactory.SAVE_AS.create (window); this. Registry (this. Avaasaction); //this.introAction = ActionFiner INTRO.create (window); //this.register(this.introAction); NewMenu = New Menu Manager ("and new", "new"); } Protected Zero Menu Menu (IMANN Manager Menubar) {Last menu manager file menu = new menu manager ("and file", "fi"); Last menu manager edit menu = new menu manager ("& edit", "edit"); Last menu manager help menu = new menu manager ("and help", "maskito"); FileMenu.add (newMenu); FileMenu.add (this.saveAction); FileMenu.add (this.saveAsAction); }}
Any of the above help is highly appreciated. Thanks in advance
You can use ActionBarAdvisor
Click to specify < Public WorkBankWindowsWorkerWorkBankWindowWizard (IWorkbenchWindowConfigurer Configr)
Your < Code> WorkBank Advair on your IApplication
PlatformUI.createAndRunWorkbench (display, consultant) Should Rdisht;
Call.
IApplication
to & lt; Run class = "application" & gt;
org.eclipse.core.runtime.applications
element in the extension point.
You have to run this application or use an org.eclipse.core.runtime. Product
product which & lt; Specifies the application in the product application = "application"
element
Comments
Post a Comment