Skip to content

Append source location to resolved bundles in target editor#2296

Draft
vogella wants to merge 1 commit intoeclipse-pde:masterfrom
vogella:target-editor-bundle-source-label
Draft

Append source location to resolved bundles in target editor#2296
vogella wants to merge 1 commit intoeclipse-pde:masterfrom
vogella:target-editor-bundle-source-label

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 19, 2026

Summary

  • Adds an optional ITargetDefinition context to StyledBundleLabelProvider. When set, each resolved TargetBundle label is suffixed with a short description of its originating ITargetLocation (directory path, feature id, or first IU repository URI), so users can tell apart entries that share the same symbolic name and version but come from different locations.
  • Wires TargetContentsGroup (the Content tab of the target-definition editor) to supply that context whenever a target is loaded or cancelled, so the suffix follows the current editor input.
  • Adds JUnit coverage for the label provider in a new StyledBundleLabelProviderTests class, added to AllTargetTests.

Answers the common user question: "I see this plug-in twice on the Content tab — where is this coming from?"

Test plan

  • AllTargetTests suite passes locally (mvn -pl ui/org.eclipse.pde.ui.tests -am -P javac -Dtycho.surefire.useUIHarness=true -Dtest=AllTargetTests verify) — 127 tests, 0 failures, 0 errors.
  • New StyledBundleLabelProviderTests covers: no suffix without context, suffix present with context, distinct suffixes for bundles resolved from two different directory locations, context clearing, and preservation of the base symbolic-name label.
  • Manual smoke in the target editor — open a target with two locations that contribute the same bundle, verify each row shows its originating location.

Add an optional ITargetDefinition context to StyledBundleLabelProvider.
When set, each resolved TargetBundle's label is suffixed with a short
description of its originating ITargetLocation (directory path, feature
id, or first repository URI). This lets users tell apart entries that
share the same symbolic name and version but come from different
locations on the Content tab of the target editor.

TargetContentsGroup sets the context whenever a target definition is
loaded or cancelled, so the suffix follows the current editor input.

Includes JUnit coverage for the label provider: no suffix without
context, suffix present with context, distinct suffixes for bundles
resolved from two different directory locations, and context clearing.
@github-actions
Copy link
Copy Markdown

Test Results

  147 files  ± 0    147 suites  ±0   34m 48s ⏱️ - 3m 2s
3 502 tests + 5  3 448 ✅ + 5   54 💤 ±0  0 ❌ ±0 
9 327 runs  +15  9 197 ✅ +15  130 💤 ±0  0 ❌ ±0 

Results for commit 2829a86. ± Comparison against base commit 9a3e908.

@HannesWell
Copy link
Copy Markdown
Member

Answers the common user question: "I see this plug-in twice on the Content tab — where is this coming from?\

Can't this question also be answered by using the 'sort by location' feature of the contents tab?

Could you please provide a screenshot of the new UI.

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 20, 2026

Answers the common user question: "I see this plug-in twice on the Content tab — where is this coming from?\

Can't this question also be answered by using the 'sort by location' feature of the contents tab?

Definitely similar but you loose the plug-ins are close together option.

Could you please provide a screenshot of the new UI.

image

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 20, 2026

Maybe the label is a bit to much...

@HannesWell would it be OK to activate the grouping by default?

@vogella vogella marked this pull request as draft April 20, 2026 08:41
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