Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335513

Summary: ImageUtilities unnecessarily restricts thread use
Product: [Tools] GEF Reporter: Randy Hudson <hudsonr>
Component: GEF-Legacy Draw2dAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: unspecified   
Target Milestone: 3.7.1 (Indigo) M5   
Hardware: All   
OS: All   
Whiteboard:

Description Randy Hudson CLA 2011-01-26 16:56:20 EST
FigureUtilities unnecessarily restricts which threads can invoke createRotatedImage(...) and createRotatedImageOfString(...)

The code should be changed to:

Display display = Display.getDefault();

allowing clients to create rotated images from multiple threads.
Comment 1 Alexander Nyßen CLA 2011-01-27 17:28:59 EST
Randy, what are you referring to? The HEAD version of org.eclipse.draw2d.FigureUtilities does not seem to contain such methods...
Comment 2 Alexander Nyßen CLA 2011-01-27 17:36:12 EST
Ah, its ImageUtilities you are referring to... I updated the summary to reflect this.
Comment 3 Alexander Nyßen CLA 2011-01-27 17:58:31 EST
Replaced calls of Display.getCurrent() with Display.getDefault() within org.eclipse.draw2d.ImageUtilities to allow invocation from non-display threads. Removed invalid access exceptions. Adopted javadoc. 

Changes committed to cvs HEAD (3.7). Resolving as fixed.