Hi all,
i'd like to register a context menu on a wizardPage. I cannot find the right solution to do that, and google didn't help me.
I'm using this kind of code to register the menu in a view :
MenuManager menuManager = new MenuManager();
menuManager.add(new Separator("mySeparator"));
tableViewer.getTable().setMenu(menuManager.createContextMenu(tableViewer.getTable()));
getSite().registerContextMenu(menuManager, tableViewer);
getSite().setSelectionProvider(tableViewer);
I thought i could use the same technique, but i cannot find the equivalent of getSite() method whnen i'm on a dialogpage.
I tried :
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart().getSite().registerContextMenu(menuManager, tableViewer);
but it's not successful: it display a popup menu but it does not contain the right elements.
Hope you can help me.
Thanks a lot.
wacho.