我已经创建了一个自定义eclipse透视图,并希望为该透视图设置一个自定义图标。我读到图标应该是16x16的格式。我尝试向扩展点提供.ico、.png、.gif文件,但似乎没有任何格式可用。我做错了什么?
<extension
id="de.mdsd.xtext.sponsorrun.application.joggathon.editor.perspectives"
name="Joggathon Editor Perspectives"
point="org.eclipse.ui.perspectives">
<perspective
class="de.mdsd.xtext.sponsorrun.application.PerspectiveFactory1"
icon="icons/Joggathon-Group16.png"
id="de.mdsd.xtext.sponsorrun.application.joggathon.editor"
name="Joggathon">
</perspective>
</extension>
.jpg、.gif或.png都可以。对于您的示例,请确保png文件位于插件的"icons"目录中。
运行测试时,您需要指定-clean
选项,以确保看到对透视图的更改。
还要确保"icons"目录出现在"build.properties"文件中。