I want to add a button to the toolbar in my page that derives from FormPage. I use the code:
Action action = some action...
action.setImageDescriptor(som descriptor...);
toolBarManager.add(action);
When i run the editor I don't see nothing in the place were the button should be. If I'm hovering it with the mouse it changes to a hand icon. 开发者_运维知识库But if i click the action doesn't run.
Sounds like it's your ImageDescriptor
returning a null image. Make sure you're creating an image that eclipse can deal with. Is your image a .png
, .gif
? Are you developing on Windows? After packaging, Java won't find it in the archive if you're case is wrong even though Windows is not case sensitive.
精彩评论