Append source location to resolved bundles in target editor#2296
Draft
vogella wants to merge 1 commit intoeclipse-pde:masterfrom
Draft
Append source location to resolved bundles in target editor#2296vogella wants to merge 1 commit intoeclipse-pde:masterfrom
vogella wants to merge 1 commit intoeclipse-pde:masterfrom
Conversation
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.
Member
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. |
Contributor
Author
Contributor
Author
|
Maybe the label is a bit to much... @HannesWell would it be OK to activate the grouping by default? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
ITargetDefinitioncontext toStyledBundleLabelProvider. When set, each resolvedTargetBundlelabel is suffixed with a short description of its originatingITargetLocation(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.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.StyledBundleLabelProviderTestsclass, added toAllTargetTests.Answers the common user question: "I see this plug-in twice on the Content tab — where is this coming from?"
Test plan
AllTargetTestssuite 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.StyledBundleLabelProviderTestscovers: 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.