| Summary: | MenuHelper.getIconURI() has no provision for non-File- or URL-based imagedescriptors | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Brian de Alwis <bsd> | ||||
| Component: | UI | Assignee: | Brian de Alwis <bsd> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | remy.suen | ||||
| Version: | 4.2 | ||||||
| Target Milestone: | 4.2 M5 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Fixed in commit d533f63b331c66c0efaf2432d0dbccbb125f7ee4: Add code to use IAdaptable/IAdapterManager to adapt the ImageDescriptor to a URL. Verified in I20120123-2200. |
Created attachment 208463 [details] Patch to MenuHelper Build: 4.2M4 I have an editor that adds actions to the toolbar. These actions are actually wrapped instances of Swing/AWT Action objects, and have a custom ImageDescriptor that wraps a Swing IconImage. Although this ImageDescriptor actually has a URL, but MenuHelper#getIconURI() specifically only handles FileImageDescriptor and URLImageDescriptor. As a result, the actions are treated as if it has no icon, and the action text is shown instead. I think we should enhance MenuHelper#getIconURI() to use the adapter manager framework, so as to provide an opportunity for non-{File,URL}ImageDescriptors to provide a URL/URI.