DESCRIPTION

Show problem decorations in staging view and commit dialog

This makes errors/warnings on the files visible while committing.
Before, these could only be noticed in other places before committing
(e.g. the package explorer).

In an early draft of this change, the decoration was done directly in
StagingViewLabelProvider (without using IDecoratorManager). The problem
with that approach was that the decorations didn't get updated after
editing a file.

With the extension point and IDecoratorManager, updating the decoration
works. And, except for having to exclude GitLightweightDecorator via
IDecorationContext, it feels cleaner.

Bug: 382755
Change-Id: I142a5f20b35f98675b90170dc1328ea637468c06
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Sebastian Porter
date: 2012-07-26 10:22:20.000000000

Patch Set 1: I would prefer that you didn't submit this

The patch goes into the right direction. There are some points that I'd like to see changed:

1) We should not introduce an option to enable/disable the decorator. None of the existing problem decorations in the SDK can be switched off. If that should be desired at some point, then this should be offered as a global setting. This will also simplify the patch set (e.g. plugin.* changes will not be needed).

2) We should not start to create 'IFile's that don't exist and then rely on 'CoreException's. Especially, I would not introduce such code in a utility class and encourage other to follow such a pattern.

-------------------------------------
author: Danika Greer
date: 2012-07-26 13:09:19.000000000

Patch Set 1:

1) I also don't like that it can be disabled. The problem is, I don't know how to use a Decorating*LabelProvider with an ILabelDecorator without getting the ILabelDecorator from the IDecoratorManager. Duplicating what DecoratorManager's ManagedWorkbenchLabelDecorator is doing would be a lot of work.

Making the ProblemLabelDecorator non-lighweight would also be an option, but that would also mean more work (for getting the marker updates right, managing the resources).

Is there another way?

2) Ok, I'll rework that part to use getFileForLocation.

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