Community
Participate
Working Groups
org.eclipse.ui.newWizards org.eclipse.ui.views These extension points do not recognize ISharedImages constants given as icon filenames. Documentation of these EPs doesn't say anything about ISharedImages support but it used to work in Eclipse release 2018-09 and earlier so i think a report is warranted.
Alexander, can you please attach a simple project with the code showing the regression?
@Alexander, I do not think it is good idea for the modern Eclipse 4.x evvironment to use ISharedImages constant in the image URL, please consider using platform URL for the image from another bundle.
(In reply to Alexander Fedorov from comment #2) > @Alexander, I do not think it is good idea for the modern Eclipse 4.x > evvironment to use ISharedImages constant in the image URL, please consider > using platform URL for the image from another bundle. Why this? ISharedImages javadoc is saying: "A registry for common images used by the workbench which may be useful to other plug-ins", and it still makes sense for me.
(In reply to Andrey Loskutov from comment #3) > > Why this? ISharedImages javadoc is saying: "A registry for common images > used by the workbench which may be useful to other plug-ins", and it still > makes sense for me. Mostly because ISharedImages itself is not really good idea. It is a set of global Image variables that can have "states", and nobody can guarantee its right "state" at the moment: it may be not yet added, or already disposed, or removed for some reason. Can it be worse? Yes, if we use plugin.xml to mention a value of a constant declared somewhere without possibility to validate anything at compile time. And we have two ISharedImages in the platform (UI and Team) and extra one in JDT. Which one of them is more "shared"?
I'm not sure that binding to concrete paths/bundles that may change in platform URL is better than using API-fied id constants, that are documented both in the interface and extension points and aren't deprecated. As to the repro example, this is the example with extension points that broke. <plugin> <extension point="org.eclipse.ui.views"> <view id="ru.taximaxim.codekeeper.ui.depcyview" name="%view.name.DepcyView" class="ru.taximaxim.codekeeper.ui.views.DepcyGraphView" icon="IMG_OBJ_ADD" /> <!-- this icon isn't shown in the view's tab but still shows in the Show View dialog --> </extension> <extension point="org.eclipse.ui.newWizards"> <wizard canFinishEarly="true" category="ru.taximaxim.codekeeper.ui.pgcodekeepercategory" class="ru.taximaxim.codekeeper.ui.pgdbproject.NewSQLEditorWizard" hasPages="false" icon="IMG_OBJ_FILE" <!-- this icon isn't shown in the new wizards list --> id="ru.taximaxim.codekeeper.ui.newsqleditorwizard" name="%wizard.name.newSQLEditorWizard" project="false"> <selection class="org.eclipse.core.resources.IFile" /> </wizard> </extension> </plugin> This still works, just for reference. <plugin> <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="menu:org.eclipse.ui.main.menu"> <menu id="ru.taximaxim.codekeeper.ui.mainmenu.pgcodekeeper" label="%menu.label.pgcodekeeper.main"> <command commandId="ru.taximaxim.codekeeper.ui.command.OpenSQLEditor" icon="IMG_OBJ_FILE" label="%command.commandname.OpenSQLEditor" style="push"> </command> </menu> </menuContribution> </extension> </plugin>
Created attachment 281179 [details] view icon not showing
Created attachment 281180 [details] wizard icon not showing
(In reply to Alexander Levsha from comment #5) > I'm not sure that binding to concrete paths/bundles that may change in > platform URL is better than using API-fied id constants, that are documented > both in the interface and extension points and aren't deprecated. > Having both URL and constant value in the same attribute looks questionable - but this is what we have already have in API for years. You are right, both approaches are quite far from ideal. What I suggest have only one advantage - PDE tools can help with a compile time check for the given target platform. At runtime both approaches will fail. May be we can introduce some standard platform way to declare "resources" that can be referenced with identifier, like Android ecosystem. In any case, thanks a lot for report! BTW, the package name from your example looks impressive.
New Gerrit change created: https://git.eclipse.org/r/154460
Gerrit change https://git.eclipse.org/r/154460 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=86f793777a711a42fbe024c28b39a462a4235b1d
Done for 2019-12 please reopen if it still actual