Skip to content

Support Eclipse features on -buildpath and container paths (#7322) - #7339

Open
peterkir wants to merge 1 commit into
masterfrom
ecl-fea-buildpath
Open

Support Eclipse features on -buildpath and container paths (#7322)#7339
peterkir wants to merge 1 commit into
masterfrom
ecl-fea-buildpath

Conversation

@peterkir

Copy link
Copy Markdown
Contributor

Features are now first-class citizens on -buildpath, -testpath, -runpath and -runbundles. The canonical syntax is:

-buildpath: org.eclipse.e4.rcp;version='4.40.0';type=org.eclipse.update.feature

A feature expands to its member bundles: references and
recursively, with platform filtering and exact→highest version fallback.

Core changes (biz.aQute.bndlib):

  • Container.TYPE.FEATURE with member expansion via Project.getFeatureMembers()
  • Type-aware version lookup via Repository.findProviders (not RepositoryPlugin.versions)
  • EclipsePlatform matcher for os/ws/arch platform filters
  • Project.getBundles() flattens features for all consumers (classpath, launcher, IDE)

Index changes (biz.aQute.repository):

  • Feature.toResource() enrichment with bnd.relation/id/version/type/os/ws/arch attributes
  • P2Indexer self-healing reindex for stale caches + .feature.jar cache-link suffix

UI changes (bndtools.core):

  • RepositoryBundleSelectionPart: canonical clause on DND and wizard add
  • SelectionDragAdapter: text drag produces canonical clause
  • VersionedClauseLabelProvider: feature icon in buildpath list
  • RepoBundleSelectionWizardPage: type-aware selection keying

SWTBot infrastructure (bndtools.core.test):

  • launch.rendered.bnd: RenderedLauncher for real Eclipse widgets
  • swtbot.tests.bnd: SWTBot test bundle with fixture workspace
  • FeatureBuildPathWizardSwtbotTest: Add Bundle dialog feature selection
  • FeatureBuildPathDndSwtbotTest: Repositories view drag→Build Path

Tests:

  • FeatureBuildpathTest (6 cases: nested, platform filter, cycles, fallback, optional, error)
  • FeatureParserTest.testMemberRelationAttributes (enrichment contract)
  • SWTBot UI tests (green on win32)

API changes:

  • aQute.bnd.build 4.7.1 → 4.8.0 (Container.TYPE.FEATURE)
  • aQute.bnd.osgi.resource 5.1.0 → 5.2.0 (TYPE_ECLIPSE_FEATURE, FEATURE_RELATION_*)
  • aQute.p2.provider 1.0.0 → 1.1.0 (relation attributes)

All changes additive; full backward compatibility.

Features are now first-class citizens on -buildpath, -testpath, -runpath and
-runbundles. The canonical syntax is:

    -buildpath: org.eclipse.e4.rcp;version='4.40.0';type=org.eclipse.update.feature

A feature expands to its member bundles: <plugin> references and <includes>
recursively, with platform filtering and exact→highest version fallback.

Core changes (biz.aQute.bndlib):
- Container.TYPE.FEATURE with member expansion via Project.getFeatureMembers()
- Type-aware version lookup via Repository.findProviders (not RepositoryPlugin.versions)
- EclipsePlatform matcher for os/ws/arch platform filters
- Project.getBundles() flattens features for all consumers (classpath, launcher, IDE)

Index changes (biz.aQute.repository):
- Feature.toResource() enrichment with bnd.relation/id/version/type/os/ws/arch attributes
- P2Indexer self-healing reindex for stale caches + .feature.jar cache-link suffix

UI changes (bndtools.core):
- RepositoryBundleSelectionPart: canonical clause on DND and wizard add
- SelectionDragAdapter: text drag produces canonical clause
- VersionedClauseLabelProvider: feature icon in buildpath list
- RepoBundleSelectionWizardPage: type-aware selection keying

SWTBot infrastructure (bndtools.core.test):
- launch.rendered.bnd: RenderedLauncher for real Eclipse widgets
- swtbot.tests.bnd: SWTBot test bundle with fixture workspace
- FeatureBuildPathWizardSwtbotTest: Add Bundle dialog feature selection
- FeatureBuildPathDndSwtbotTest: Repositories view drag→Build Path

Tests:
- FeatureBuildpathTest (6 cases: nested, platform filter, cycles, fallback, optional, error)
- FeatureParserTest.testMemberRelationAttributes (enrichment contract)
- SWTBot UI tests (green on win32)

API changes:
- aQute.bnd.build 4.7.1 → 4.8.0 (Container.TYPE.FEATURE)
- aQute.bnd.osgi.resource 5.1.0 → 5.2.0 (TYPE_ECLIPSE_FEATURE, FEATURE_RELATION_*)
- aQute.p2.provider 1.0.0 → 1.1.0 (relation attributes)

All changes additive; full backward compatibility.

Signed-off-by: Peter Kirschner <peter@klib.io>
Comment on lines +38 to +43
* An Eclipse feature (identity type
* {@code org.eclipse.update.feature}). A feature is a container of
* included bundles and included features; on a path it expands to its
* members, see {@link Container#getMembers()}.
*/
FEATURE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just thought: Since this is core bnd, we should maybe be careful about wording and don't make it specific for "Eclipse". But since the "OSGi-Feature-Launcher" & OSGi Feature Runtime is a new "thing" we shoukd maybe just call it FEATURE. Eclipse would be just one specific instance of a feature and OSGi feature could be another thing.

@timothyjward @peterkir @juergen-albert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants