Community
Participate
Working Groups
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"); } }
I assume PerspectiveRenderer would be the right place to look.
I'll take a look.
(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.
https://git.eclipse.org/r/23826 Tested with live editor on the IDE
Fixed with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=0daf35dbb60f618fab5d033c4a08a3c158fc458c Thanks Sopot for the fix.
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
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.
(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
(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!