Feb 04 2009

Eclipse Jobs API – Errata

Published by Radoslaw Urbas at 6:19 pm under Eclipse,IT,Java

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.

	setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
	setProperty(IProgressConstants.ICON_PROPERTY, ImageDescriptorFactory
		.createImageDescriptor(ICON_NAME));

3 responses so far

3 Responses to “Eclipse Jobs API – Errata”

  1. Łukasz Milewskion 04 Feb 2009 at 6:40 pm

    And you don’t need KEEP_PROPERTY to show icon, ICON_PROPERTY is sufficient

  2. Radoslaw Urbason 04 Feb 2009 at 6:43 pm

    You are right. KEEP_PROPERTY is there in the code for other purposes than icons.

  3. marioModelon 06 Feb 2009 at 11:36 am

    Thank you so much Lukasz… I love you guys… You’re the best!

Trackback URI | Comments RSS

Leave a Reply