fix source lookup for sub-projects via -sub instruction #6463
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.
This is a continuation of #6165 which fixed it for normal bundle bnd.bnd files. But the previous PR did not consider the -sub instruction feature of bnd where you can define multiple sub-jar per project. The repos inside -includeresource instructions of such sub-bnd.bnd files were not considered yet.
(see also https://bnd.discourse.group/t/generating-multiple-bundles-per-project/84)
What does it improve?
Let's say you use the -sub instruction to have multiple sub-bundles resulting multiple .jar files generated for your project.
In a subbundle you are doing e.g.
to include / wrap a dependency from your
repoBefore this fix:
When you were debugging and stepped into one of the files of
org.apache.poi:poi, Eclipse did not jump into the source code of that file , but instead showed this:(although you are sure that you have the source code because outside of the Debugger you can view the source... but just not when jumping into the code via debugger).
After this fix:
Debugging into the same class now opens the source. Just as described in #6165
How to verify / test it:
A way to trigger (and test) this code in BndrunDirectiveSourceContainer is:
Basically
runbundlesnow shows repoRef entries coming from-includeresourcewhich are not there in 7.1.0