DESCRIPTION

Bug 264404 - Problem decorators on Resources Project Explorer

This adds the problem marker decoration to resources, via the Resource
CNF extension.

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


COMMENTS

author: Isis Velasquez
date: 2016-10-11 07:37:54.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-10-11 07:38:00.000000000

Patch Set 1:

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

-------------------------------------
author: Isis Velasquez
date: 2016-10-11 07:40:12.000000000

Patch Set 1:

I'm unsure about how the DecorationOverlayIcon should be used there. It forces me to create an Image, but I cannot dispose this Image immediatly after creation of the DecorationOverlayIcon. Should I dispose it, or is it something that is performed by the DecorationOveralyIcon?

-------------------------------------
author: Brenden Conley
date: 2016-10-11 08:14:10.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Jayvion Booth
date: 2016-10-11 15:10:44.000000000

Patch Set 1: Code-Review-1

(3 comments)

-1 for the comments in code.

One extra question: what about the concerns on the bug related to duplication of added warnings?

Line:176, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionContentProvider.java -> Why *project*?

Line:63, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionLabelProvider.java -> I would first check other preconditions and delay resolving the adapter until really needed, because it is not for free

Line:78, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionLabelProvider.java -> yes, this is a resource leak, but also I don't think you are supposed to create image from returned descriptor. I think you should use DecorationOverlayDescriptor

-------------------------------------
author: Isis Velasquez
date: 2016-10-11 15:17:42.000000000

Patch Set 1:

(3 comments)

The duplication of warnings should not happen with this approach as the CNF only uses this label provider for content that's provided by the Resource extension, whereas currently error markers are shown for content contributed by the JDT extension. Both label providers shouldn't apply simultaneously on the same tree element.

Line:176, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionContentProvider.java -> To have the error markers also applies on parent folders and project. If we only update current resource, the markers don't show up for parents until we refresh or collapse/expand them.

Line:63, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionLabelProvider.java -> I do not see any other operation we could run before that doesn't need this resource. Which precondition are you referring to?

Line:78, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionLabelProvider.java -> Ok, that seems much better to use what you suggest. Thanks for the hint. I'll put it in next patch set.

-------------------------------------
author: Jayvion Booth
date: 2016-10-11 15:20:51.000000000

Patch Set 1:

(1 comment)

Line:78, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionLabelProvider.java -> Oops, I see that DecorationOverlayDescriptor is a class available in EGit, not in the platform. Crazy.
There is also org.eclipse.ui.internal.ide.misc.OverlayIcon... Mistery.

-------------------------------------
author: Jayvion Booth
date: 2016-10-11 15:29:03.000000000

Patch Set 1:

(2 comments)

Line:176, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionContentProvider.java -> Please note that this will add *multiple* runnables for same project if delta contains more then one child.

Additionally, I think if we add a refresh runnable for the project we can immediately return, because it will refresh every child under project.

Line:63, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionLabelProvider.java -> if(res == null){
return null;
}

-------------------------------------
author: Jayvion Booth
date: 2016-10-11 15:32:29.000000000

Patch Set 1:

(1 comment)

Line:78, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workLeon Ochoach/ResourceExtensionLabelProvider.java -> Also see org.eclipse.ui.internal.OverlayIcon

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

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

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