DESCRIPTION

Bug 264404 - Problem decorators on Resources Project Explorer

This adds the problem marker decoration to resources, via the Resource
CNF extension.
Some performance should have been improved by avoiding multiple refresh
operations on same "branch" in the tree (only refreshing the highest
one).
The patch also include the possibility for JFace's DecorationOverlayIcon
to take an ImageDescriptor as input.

Change-Id: I88e0c241587a53c68de830d951f24d77d888061d
Signed-off-by: Isis Velasquez xxx@xxx.xxx


COMMENTS

author: Isis Velasquez
date: 2016-10-12 11:09:18.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2016-10-12 11:09:24.000000000

Patch Set 3:

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

-------------------------------------
author: Krista Shepherd
date: 2016-10-12 11:29:48.000000000

Patch Set 3:

(1 comment)

Line:65, bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/DecorationOverlayIcon.java -> Consider marking this constructor xxx@xxx.xxx since it is not necessary to allocate an Image resource here.

-------------------------------------
author: Brenden Conley
date: 2016-10-12 11:41:35.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Jayvion Booth
date: 2016-10-12 12:40:17.000000000

Patch Set 3: Code-Review-1

(8 comments)

I'm highly skeptical regarding the new API and implementation for that in DecorationOverlayIcon. It is really hard to say if this will have unexpected side effects, especially looking at DecorationOverlayIcon and it super class CompositeImageDescriptor implementation.

The code is hard to understand even without new change, with the new change it is a nightmare to maintain.

I would wish you were using some existing OverlayIcon class here or adding new DecorationOverlayDescriptor like in EGit, but mixing both implementation in DecorationOverlayIcon looks not OK for me.

Line:198, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionContentProvider.java -> why don't we return here?

Line:61, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionLabelProvider.java -> Can we please name it "descriptor"? "res" is usually used for IResource and friends.

Line:45, bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/DecorationOverlayIcon.java -> I'm not sure if this is a good idea to re-use DecorationOverlayIcon because its superclass already has "imageData" and does some thing with it, see getImageData().

Line:48, bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/DecorationOverlayIcon.java -> maintenance hell.

Line:66, bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/DecorationOverlayIcon.java -> previously we would not allow sizeValue be null because we will dereference it later and throw NPE. Now it is possible, because it will be re-computed from image data. This is kind of surprising and hard to test (no crash anymore, just wrong result size), so it will be found very late in test cycle (if found at all).

Line:117, bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/DecorationOverlayIcon.java -> Please use baseDescriptor, overlayDescriptor etc here and in javadoc above. Also fix the javadoc to point that it uses not images, but descriptors.

Line:118, bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/DecorationOverlayIcon.java -> this is not nice.

Line:211, bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/DecorationOverlayIcon.java -> This triggers now baseImage.getImageData() if size was not specified for Image based constructors but would lead to NPE before.
For descriptor-based data this creates a second ImageData object (parent has one).

-------------------------------------
author: Gerrit Code Review
date: 2016-11-25 12:50:49.000000000

Change has been successfully merged into the git repository by Isis Velasquez

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