Community
Participate
Working Groups
I understand that duplicate plugins should not exist in the system, but it is possible that during plugin development, different plugins with the same version and id may be loaded into the plugin registry. This has happened to me while working on some SWT examples. The latest build copy of the plugins was in dev\eclipse\plugins\..., and the new development edition was in target\eclipse\plugins\.... So when PDE started up (self-hosting Eclipse would do the same thing), both copies were included in the registry. The differences between the two versions were: - some code changes (no new classes) - one additional dependency It is the additional dependency that caused problems. When trying to reference classes introduced into the plugin's runtime environment via the new dependency, the ClassLoader failed to find them - issuing a ClassDefNotFoundError. Some other minor quirks as well in the data fetched from the PluginRegistry (the new dependency figured on both copies of the plugin, not just the second). Though this problem should never occur in practice, it may be helpful to add a couple lines to either: 1) discard plugins with the same id and version as one already in the registry 2) disambiguate seeming duplicates by appending an extra character to the version number of those plugin id / version pairs that get registred twice so the assertions about there being only one plugin with a given id and version holds. JB (11/06/2001 8:16:28 PM) NOTES: JM (6/12/2001 3:07:20 PM) defer
PRODUCT VERSION: Build 122
Investigated in build 20020123; the behaviour is the same. It continues to allow multiple plugins with the same ID, but problems can arise. We should be trapping this while parsing/resolving the plugin registry.
I've written a fix in RegistryLoader, so that it skips duplicates and logs an appropriate error message. Waiting to review with Debbie before releasing. We also need a test case.
Fixed. Now weeding out duplicate plugins in the RegistryLoader.