Provide bundle groups without scanning the installation - #2866
Conversation
2f85446 to
7cd3ad3
Compare
|
Something for early next release |
The only IBundleGroupProvider in the SDK was BundleGroupComponent in org.eclipse.update.configurator. Asking it for bundle groups built the legacy PlatformConfiguration, which reconciles the install site and opens every plugins/*.jar to read its manifest. That happens on the IDE startup path, on the UI thread, because WorkbenchActionBuilder needs feature information to decide whether to contribute the Welcome and Tips and Tricks actions. The new bundle org.eclipse.core.runtime.bundlegroups registers an equivalent provider that reads only feature data. The feature list comes from the platform.xml that p2 writes at provisioning time, with a scan of the features directory as a fallback for installations without one. Name, provider, images and the welcome and tips and tricks references still come from the about.ini of the branding bundle, and description, license and bundle list are parsed from feature.xml on first access. No plug-in jar is opened at any point. The platform.xml model and parser are copied from the read path of org.eclipse.equinox.internal.p2.update in org.eclipse.equinox.p2.touchpoint.eclipse, pruned to the elements and attributes a feature entry needs. The writer, the write-side state and the configuration cache were not taken. A copy rather than a dependency keeps p2 out of org.eclipse.rcp, which ships without it, and PDE set the same precedent with org.eclipse.pde.internal.core.update.configurator. The branding reader is copied from org.eclipse.update.internal.configurator because p2 has no equivalent. BundleGroupComponent and its Service-Component entry are removed in the same change, since two registered providers would list every feature twice in the About dialog. Nothing else in org.eclipse.update.configurator is touched: the deprecated IPlatformConfiguration API and its factory stay until their announced removal.
7cd3ad3 to
03e3ae4
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
|
Wow, that's a lot of code. I guess it moved from somewhere? |
Yes, most comes from org.eclipse.equinox.internal.p2.update |
|
I guess without history. Oh well... |
|
I see that at least |
The whole code in update.configurator can be deleted once this is in and the planned API deletion period for update.configurator has been reached. |
|
That code is not API, is it? So why not (re)move it right away? |
I check tomorrow, IIRC some API marked for deletion was using it. |
Fixes #2863
The SDK's only
IBundleGroupProviderwasBundleGroupComponentinorg.eclipse.update.configurator, which built the legacyPlatformConfigurationand opened everyplugins/*.jarto read its manifest, on the UI thread during startup. This replaces it with a provider in the new bundleorg.eclipse.core.runtime.bundlegroupsthat reads the feature list from theplatform.xmlp2 writes at provisioning time, falling back to a scan of thefeaturesdirectory for installations without one. Branding still comes from the branding bundle'sabout.ini, and description, license and bundle list are parsed fromfeature.xmlon first access, so no plug-in jar is opened at any point.Besides removing the startup cost, this takes the last consumer off
IPlatformConfigurationFactory. After this change nothing outsideorg.eclipse.update.configuratorreferences the deprecated API, so its announced removal becomes a no-op rather than a regression in the About dialog. The bundle itself and the deprecated API stay untouched until then.The
platform.xmlmodel and parser are copied from the read path oforg.eclipse.equinox.internal.p2.updateand pruned to what a feature entry needs. Copying rather than depending keeps p2 out oforg.eclipse.rcp, which ships without it; PDE set the same precedent withorg.eclipse.pde.internal.core.update.configurator. No consumer changes are needed since they all go throughPlatform.getBundleGroupProviders().Note for merging: this needs a matching
<plugin id="org.eclipse.core.runtime.bundlegroups" version="0.0.0"/>entry inorg.eclipse.rcp/feature.xmlover ineclipse.platform.releng.aggregator. Until that lands there is no bundle group provider at all, since the old one is removed here.