Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Cloning All Menus from Parent
Cloning All Menus from Parent [message #1709275] Fri, 25 September 2015 14:32
dhruba kumar is currently offline dhruba kumarFriend
Messages: 51
Registered: September 2012
Member
The Eclipse menus in Mainn-Window as shown in Image 1.png , want to copy in Child Window.

public class MyChildWindow extends ApplicationWindow
{



public Control createContents(Composite parent) {


.....


}


@Override
protected MenuManager createMenuManager() {
MenuManager menuManager = new MenuManager();

menuManager.add(parentmenumanager); // Adding Parent Menumanager to Child Window.
....

}


I can get all menus of Main-Window using following code :

MenuManager parentmenumanager=((WorkbenchWindow)window).getMenuManager();
IContributionItem[] items = parentmenumanager.getItems();
for (IContributionItem item : items)
{
System.out.println(item.getId());
}


But this code is unable to set Menu of Parent to Child .

Please suggest
  • Attachment: 1PNG.PNG
    (Size: 9.89KB, Downloaded 104 times)
Previous Topic:Running .jar Files without JDK installed
Next Topic:Add buttons on app MQTT PAHO
Goto Forum:
  


Current Time: Wed Apr 24 14:30:55 GMT 2024

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

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

Back to the top