DESCRIPTION

Bug 477391 - Provide a deferred way to create ImageDescriptors in JFace

Change-Id: Ic547e3014bdce54f736faed17f7dbf6f3c544232
Signed-off-by: Irvin Riggs xxx@xxx.xxx


COMMENTS

author: Irvin Riggs
date: 2015-12-04 20:03:50.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-12-04 20:03:55.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/7699/

-------------------------------------
author: Brenden Conley
date: 2015-12-04 20:22:32.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/7699/ : SUCCESS

-------------------------------------
author: Kelly Potter
date: 2015-12-04 21:19:29.000000000

Patch Set 1:

(7 comments)

Please also adopt the new descriptor type in WorkLeon OchoachImages.

Line:469, bundles/org.eclipse.jface/src/org/eclipse/jface/resource/JFaceResources.java -> Keep the bundle != null check in this method rather than in the new API.

Line:18, bundles/org.eclipse.jface/src/org/eclipse/jface/resource/LazyImageDescriptor.java -> Use package visibility

Line:27, bundles/org.eclipse.jface/src/org/eclipse/jface/resource/LazyImageDescriptor.java -> Use Supplier<ImageData> instead of a new interface. We don't want to force callers to wrap their ImageData in an ImageDescriptor.

Line:34, bundles/org.eclipse.jface/src/org/eclipse/jface/resource/LazyImageDescriptor.java -> final

Line:35, bundles/org.eclipse.jface/src/org/eclipse/jface/resource/LazyImageDescriptor.java -> No need to cache this. ImageDescriptor#getImageData() is almost always called from within a ResourceManager which does this sort of caching automatically.

Line:52, bundles/org.eclipse.jface/src/org/eclipse/jface/resource/LazyImageDescriptor.java -> Remove the "fallback" argument and fallbackPath.

Move this method to ImageDescriptor. Make a new method called static ImageDescriptor.createFromFile(Bundle, String).

The if (bundle != null) statement can live in a private helper method in JFaceResources.

xxx@xxx.xxx tag

Add full JavaDoc

Line:70, bundles/org.eclipse.jface/src/org/eclipse/jface/resource/LazyImageDescriptor.java -> Just return supplier.get(). No need for a cache or a branch.

-------------------------------------
author: Kelly Potter
date: 2015-12-04 21:19:38.000000000

Patch Set 1: Code-Review-1

-------------------------------------
author: Kelly Potter
date: 2015-12-04 21:21:33.000000000

Patch Set 1:

(2 comments)

Line:10, bundles/org.eclipse.jface/src/org/eclipse/jface/resource/JFaceResources.java -> Add your name to the copyright header.

Line:1, bundles/org.eclipse.jface/src/org/eclipse/jface/resource/LazyImageDescriptor.java -> Add copyright header

-------------------------------------
author: Gerrit Code Review
date: 2015-12-08 00:39:30.000000000

Change has been successfully merged into the git repository by Kelly Potter

-------------------------------------
