// don't show if the debug button is disabled.
if (!isVisible()) {
return;
}
Menu menu = manager.createContextMenu(applicationActionButton);
applicationActionButton.setMenu(menu);
Rectangle bounds = toolBar.getBounds();
// Position the menu near the toolitem
Point topRight = new Point(bounds.x + bounds.x / 10, bounds.height);
topRight = applicationActionButton.toDisplay(topRight);
menu.setLocation(topRight.x, topRight.y);
menu.setVisible(true);
}