This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 410528 - [CommonNavigator] ProjectExplorer should use its viewer's label provider to build its content description
Summary: [CommonNavigator] ProjectExplorer should use its viewer's label provider to b...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.4 M1   Edit
Assignee: Francis Upton IV CLA
QA Contact: Francis Upton IV CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-11 15:22 EDT by Brian Vosburgh CLA
Modified: 2013-07-02 15:47 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Vosburgh CLA 2013-06-11 15:22:14 EDT
Currently, ProjectExplorer.updateTitle() sets the part's content description (which is displayed at the top of the view's tree whenever the user uses the "Go Into" context command to change the tree's root) by first attempting to adapt the viewer's input to IWorkbenchAdapter and using that adapter to build a label. The resulting label is used for the content description. If this is not successful, the content description is simply set to the result of calling toString() on the input.

It seems like the appropriate way to build the content description would be to use the already available label provider; especially since it seems the purpose of IWorkbenchAdapter is to be used by a "universal" label provider, not directly by the Viewer.
Comment 1 Brian Vosburgh CLA 2013-06-11 15:42:53 EDT
Pushed a patch to Gerrit:
https://git.eclipse.org/r/13758
I hope I know what I'm doing.... :-)
Please let me know if I've screwed it up.
Comment 2 Paul Webster CLA 2013-06-21 14:58:41 EDT
Francis, the only question I have is should it do the IWorkbenchAdapter first and then switch to the label provider if that doesn't work?

PW
Comment 3 Francis Upton IV CLA 2013-06-21 15:56:25 EDT
(In reply to comment #2)
> Francis, the only question I have is should it do the IWorkbenchAdapter
> first and then switch to the label provider if that doesn't work?

I think trying the CN label provider first is better, that gives better local control, so I like the way Brian did that.

I think I reviewed and released it (but it won't show the committer as me, any way to fix that, or should I go something different in gerrit)?

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d5f4e3d2d6eabbfa9bf71d25c3b3f41366d1ef6d

Brian, can you verify this is correct in the next nightly or I build and then mark this bug report as verified?
Comment 4 Paul Webster CLA 2013-06-21 16:02:12 EDT
(In reply to comment #3)
> I think I reviewed and released it (but it won't show the committer as me,
> any way to fix that, or should I go something different in gerrit)?

No, that's the way it works.  If we auto-rebase it, Gerrit becomes the committer, but the EFoundation is fine with that as they still have the Gerrit review record.

Thanks,
Paul
Comment 5 Brian Vosburgh CLA 2013-07-02 15:47:26 EDT
Verified with I20130625-0800. Thanks!