Prevent initial build-path errors on new external-folders in container #3731
+6
−5
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.
What it does
When adding an external-folder ('library-folder') to a classpath-container for the first time the initial build (without a rebuild, e.g. through auto-build) leads to a build-path (validation) error.
This happens for example when adding to a MANIFEST.MF a new requirement on a bundle that's a directory and not a jar and the PDE 'required-Plugins' classpath container is updated.
The reason is that the validation checks the linked folders created for external-folders. Calling
ExternalFolderChange.updateExternalFoldersIfNecessary
before the validation avoids these false-positive errors.How to test
The use-case in our code-base is non-trivial, but I can try to derive a dedicated test-case for it once I know that this doesn't break anything and is generally a reasonable change.
Author checklist