Do not load perspective icons of uninstalled bundles - #4365
Open
vogella wants to merge 1 commit into
Open
Conversation
A perspective persisted in the model outlives the bundle that contributed it, and loading its icon then makes FileLocator log an error per attempt. Check the bundle first and fall back to the default perspective icon. Fixes eclipse-platform#4364 Assisted-by: multiple AI agents and layers of automated tooling 🤖
Contributor
Test Results 572 files - 277 572 suites - 277 38m 16s ⏱️ - 25m 2s Results for commit 04a88c0. ± Comparison against base commit 3baf21b. This pull request skips 5 tests. |
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.
A perspective persisted in the application model outlives the bundle that contributed it. Its icon URI then points to a bundle that is no longer installed, and every load attempt makes FileLocator log an error, which is what fills the error log in #4364 once the perspective switcher paints the item on each window creation.
The registry now checks that the bundle is installed before it builds an ImageDescriptor for a model perspective. Such a perspective falls back to the default perspective icon, which is what it showed anyway, and the log stays clean. The perspective itself is left alone, so removing it stays a manual decision.