|
|
|
|
Re: fragment.e4xmi perspective does not show specified icon [message #1263137 is a reply to message #1251197] |
Tue, 04 March 2014 08:08 |
Martin Jacob Messages: 191 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
thanks for your investigations! I will try it in coming days and looking forward to fix this bug.
But for now I will try your workarounds, Martin
schrieb Ed Yarve, Am 20.02.2014 02:41:
> Thank you for the answer.
>
> I decided to debug the internal Eclipse code which initializes the PerspectiveDescriptor from
> plug-in registry. I found that image is never populated in the descriptor. The initialization of the
> image is done while requesting the image by PerspectiveDescriptor.getImageDescriptor() method, when
> it called for the first time. This method uses IConfigurationElement.getNamespaceIdentifier() to
> find a plug-in to retrieve the icon from. In my case the returned identifier was not correct. If my
> plug-in was named "com.xyz.bugs.icon.myplugin", the returned identifier was only "com.xyz.bugs".
>
> The following extension will show the default icon, instead of icons/sample.gif.
>
>
> <extension
> id="com.xyz.bugs.perspectives"
> name="xyz"
> point="org.eclipse.ui.perspectives">
> <perspective
> class="com.xyz.bugs.icon.PerspectiveFactory"
> icon="icons/sample.gif"
> id="com.xyz.bugs.icon.MyPerspective"
> name="xyz perspective">
> </perspective>
> </extension>
>
>
> If the extension id would be "com.xyz.bugs.icon.perspectives" it would actually work fine, as it
> looks like Eclipse removes the last component "perspectives" and treats the rest as a plugin to
> retrieve the icon from. I did not find this in documentation, so i think it is a bug.
>
> Another way to solve the issue is to remove id from the extension:
>
>
> <extension
> name="xyz"
> point="org.eclipse.ui.perspectives">
> <perspective
> class="com.xyz.bugs.icon.PerspectiveFactory"
> icon="icons/sample.gif"
> id="com.xyz.bugs.icon.MyPerspective"
> name="xyz perspective">
> </perspective>
> </extension>
>
> I was also able to reproduce this on a sample plug-in, so I can actually file a bug.
>
|
|
|
Powered by
FUDForum. Page generated in 0.05151 seconds