Community
Participate
Working Groups
Build ID: I20100429-1549 When I synchronize resources that contain compile errors, then the error decorator will be shown in the sync view. However, if I fix the error and save the file, then the sync view does not update its decorator for the resource. Steps to reproduce: 1. Produce a compile error in file and save 2. Synchronize your workspace 3. Sync view shows the modified resource with error decorator 4. Open editor, fix error and save 5. Error decorator in package explorer and editor disappears 6. Error decorator in sync view stays See screenshot.
Created attachment 168124 [details] Wrong error decorator in sync view
This is caused by a faulty fix in bug 291492. I'll give it a shot this week.
Created attachment 168405 [details] Fix A v01
Created attachment 168406 [details] mylyn/context/zip
Created attachment 168407 [details] Fix B v01
In fix B, when a DecoratingStyledCellLabelProvider is encountered we handle it in a similar way we did with DecoratingLabelProvider. The only difference is that we need to translate IStyledLabelProvider to ILabelProvider (see CommonViewerAdvisor.toLabelProvider(IStyledLabelProvider) method). In fix A we stick to DecoratingStyledCellLabelProvider (we replace it with DecoratingLabelProvider in fix B), but to do so we need a new class that extends DecoratingLabelProvider and implements IStyledLabelProvider at the same time (see DecoratingLabelProvider2). With both patches applied I'm still able to observe a situation when the error decorator is not reset correctly, but this happens occasionally. These are quick fixes, prepared to illustrate possible solutions. Do not commit.
Prakash could you please take a look at the patches (at least at Fix A, as it seems to be a better approach)? I'm feeling kind of lost in the label providers jungle, and I would be very happy if you could comment whether the suggested fixes are any good. Or could you point to someone who could help.
(In reply to comment #7) > Or could you point to someone who could help. I remember that Boris was able to give valuable tips having just a glimpse at the code.
As a *workaround* you could re-sync (removing the current synchronization first) or simply switch to a different mode (eg from Outgoing Mode to Incoming Mode) and then switch back to the mode you started with.
It would be great to have this fixed in 3.6, but at the current stage we will need two committers and a component lead to accept the change. Since I'm not sure if the way I manipulate label providers is correct, I'm setting two reviewers from the UI team. Guys, if you have any doubts about the fix please let me know and I will try to prepare a better one for 3.6 or postpone it until 3.7.
Created attachment 169790 [details] Fix A v02 Added check if IStyledLabelProvider passed to the nested label provider is not, by any chance an instance of ILabelProvider. Suggested by Prakash.
Apparently Boris is too busy right now, Pawel could you review the latest patch?
The latest patch causes labels are no longer styled. The easiest way to observe it is to have an outgoing change in Synchronize view and select update on the project.
Created attachment 169967 [details] Fix A v03
(In reply to comment #13) > The latest patch causes labels are no longer styled. Good catch! It's fixed in the latest patch. Could you give it a second chance?
(In reply to comment #15) > Could you give it a second chance? Looks good.
Created attachment 169971 [details] Fix A v04 Missed the decoration context. Thanks Remy!
I would have been against fixing this so late in the cycle but seeing that it was a regression introduced in M3, I think it is worth fixing.
Whoops.
Guys could you review the latest patch?
(In reply to comment #20) It's a distracting regression, +1 for RC3.
Applied to HEAD, available in builds I20100527-0800. Filled bug 314629 for change sets decoration issue spotted by Remy (not related to this issue since it happens in 3.6M1 as well) and bug 314435 which is basically a question why DelegatingStyledCellLabelProvider does not implement IFontProvider. Thank you to all reviewers... and the academy ;)