Community
Participate
Working Groups
Build Identifier: M20100909-0800 An export wizard can be overridden using the extension point: <extension point="org.eclipse.ui.exportWizards"> For example, Plugin A declares an export wizard and defines a class and id for the wizard. Then Plugin B declares the same export wizard using the same id for the wizard (possibly using a different class). When right clicking a project/resource and selecting Export >, the wizard is only listed once - which is the expected behavior, the declaration from plugin B overrides the declaration from plugin A. Executing the wizard causes eclipse to execute the class declared by plugin B. However, from the File->Export menu action, the first panel of the wizard (showing the set of export wizards categorized by their declared categories) will show both the export wizard declaration from plugin A and the export wizard declaration for plugin B. This is a inconsistency in the UI display here. I would expect that both mechanisms for accessing the export wizards would behave the same way - both allowing the wizard to be overridden and only showing a single wizard for each unique id. I believe the problem is in org.eclipse.ui.internal.registry.WizardsRegistryReader.readWizards, where the extension point for export wizards are read in. This code (and the methods that it calls) appear to not attempt to do any Set filtering to eliminate duplicate wizard definitions. Reproducible: Always Steps to Reproduce: 1. create 2 plugins which declare the same export wizard 2. right click a resource - observe only a single entry for that export wizard in the context menu 3. click File->Export - observe multiple entries for that export wizard in the categorized view
I don't think duplicate ids are a valid use case. I guess we should mark this as invalid.
The IDs cannot be duplicates ... there's no supported override feature, a non-deterministic override in play. But that means our handling is inconsistent. We should shore this up: 1) the first wizard encountered is included. 2) any subsequent wizards with the same ID are discarded with a warning message in the log about duplicates. 3) the first panel of the export wizard dialog should only show the first wizard. PW
If preventing overriding from happening is the correct course of action, this should also be addressed in the resource right click menu. Currently, the resource right click menu is allowing a subsequent definition of the export wizard in another plugin to override the definition in the first.
(In reply to comment #3) > If preventing overriding from happening is the correct course of action, this > should also be addressed in the resource right click menu. Yes, I agree. Which ever one we pick has to be the only one surfaced in all of the locations. PW
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant please remove the stalebug whiteboard tag.