I cannot get this to work so I thought it might be a wise idea posting over here...
I have a context menu in SWT (actually its an Eclipse plugin). It's a cascaded menu, so it expands as soon as you hover over a certain entry...
My problem is, that I want to attach a small icon to the menu but I struggle with that!
// icon for the "change color" menu
ImageDescriptor icon = ImageDescriptor.createFromFile(null,
MenuManager colorMenu = new MenuManager("Menu", icon, null);
// add the action to the submenu
Bundle bundle = Platform.getBundle(pluginId); URL fullPathString = BundleUtility.find(bundle, "icons/palette_brush.png"); ImageDescriptor.createFromURL(fullPathString);
pluginId is the id of the plugin where you put your icon.