This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 391961 - MUILabel setIconURI does not work for MPerspective
Summary: MUILabel setIconURI does not work for MPerspective
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-15 13:26 EDT by Florian Sibert CLA
Modified: 2014-04-29 10:57 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Sibert CLA 2012-10-15 13:26:25 EDT
Trying to update at runtime the icon of a perspective (already loaded with default icon).
Note that changing the Label works fine (as per below snippet).

MPerspective modelPerspective = (MPerspective) modelService.find(Perspective.ID, application);
if (modelPerspective != null) {
	ImageDescriptor imageDescriptor = imageRegistry.getDescriptor(imageKey);
	if (imageDescriptor != null) {
		String imageURL = MenuHelper.getImageUrl(imageDescriptor);
		modelPerspective.setIconURI(imageURL);
		//modelPerspective.setLabel("Blah5");
	}
}
Comment 1 Lars Vogel CLA 2014-03-19 23:03:38 EDT
I assume PerspectiveRenderer would be the right place to look.
Comment 2 Nobody - feel free to take it CLA 2014-03-24 10:53:06 EDT
I'll take a look.
Comment 3 Nobody - feel free to take it CLA 2014-03-24 19:41:41 EDT
(In reply to Lars Vogel from comment #1)
> I assume PerspectiveRenderer would be the right place to look.

Well no because the perspective icons are rendered in the perspective switcher not by the renderer himself. I'll come up with a patch.
Comment 4 Nobody - feel free to take it CLA 2014-03-24 19:45:34 EDT
https://git.eclipse.org/r/23826

Tested with live editor on the IDE
Comment 6 Paul Webster CLA 2014-03-25 09:47:06 EDT
There are 2 other fixes needed:

I added them to https://git.eclipse.org/r/#/c/23826/ which doesn't say merged, it still says review in progress.

If the review is not still in progress :-) please abandon it and make the 2 fixes in a separate commit.

PW
Comment 7 Nobody - feel free to take it CLA 2014-03-25 09:51:04 EDT
That's weird. There's a +2 on gerrit, there's a commit which seems to have gone to master but still I don't see the commit in the git log https://git.eclipse.org/c/platform/eclipse.platform.ui.git/log/

However I'll submit another patch.
Comment 8 Paul Webster CLA 2014-03-25 09:59:28 EDT
(In reply to Sopot Cela from comment #7)
> That's weird. There's a +2 on gerrit, there's a commit which seems to have
> gone to master but still I don't see the commit in the git log
> https://git.eclipse.org/c/platform/eclipse.platform.ui.git/log/
> 
> However I'll submit another patch.

If you don't see it in the e.p.ui.git/log, then it was never merged into master.  You can just amend the current commit and push it up for review again.

PW
Comment 9 Lars Vogel CLA 2014-03-31 16:22:10 EDT
(In reply to Paul Webster from comment #6)
> There are 2 other fixes needed:
> 
> I added them to https://git.eclipse.org/r/#/c/23826/ which doesn't say
> merged, it still says review in progress.
> 
> If the review is not still in progress :-) please abandon it and make the 2
> fixes in a separate commit.

Sopot adjusted his implementation and the whole change got committed with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=556c9f7fd8dd53dac8c419cc460c81ac349ade27

Thanks Sopot!