My colleague Lukasz Milewski has just spotted a missing piece in a code sample for creating icons presented in previous post. In the screenshot you can see nice icons for currently running Jobs as well as for scheduled Jobs. You need to set two properties in your Job implementation to associate an icon with it.
Recently I had to do couple of tricks Eclipse RCP applications. Basically all of the pieces of code presented below need to be placed in method
initialize(IWorkbenchConfigurer configurer). You need to override this method in
- Displaying icons in Navigator View
final String ICONS_PATH = "icons/full/";
final String PATH_OBJECT = ICONS_PATH + "obj16/";
Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH);
IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT + "prj_obj.gif", true);
+ "cprj_obj.gif", true);
- Enabling Decoration Context
DecorationContext dc = (DecorationContext) DecorationContext.DEFAULT_CONTEXT;
- Enabling Jobs Progress Bar
IWorkbench wb = PlatformUI.getWorkbench();
Probably you don’t need any of those when running your plug-ins in Eclipse IDE. The tricky part is running it in a stripped to minimum RCP based applications.