Fix vanishing markers when no resource is selected in Problems view#3862
Fix vanishing markers when no resource is selected in Problems view#3862vogella wants to merge 1 commit into
Conversation
Test Results 852 files 852 suites 52m 47s ⏱️ Results for commit 4ac15a8. ♻️ This comment has been updated with latest results. |
2e0b3b0 to
ed50b35
Compare
|
Hi @vogella — thank you for your contribution! The Eclipse Contributor Agreement (ECA) check has failed for this pull request due to one of the following reasons:
To resolve this, please:
Once done, push a new commit (or rebase) to re-trigger the ECA validation. If you believe you've already completed these steps, please double-check your account settings or report an issue to Eclipse Foundation Helpdesk. Thanks again for your contribution! |
a9de653 to
689b185
Compare
963b443 to
4ac15a8
Compare
When the filter scope is set to a selection-dependent value (e.g., 'Selected resource', 'Same project') and no resource is currently selected in the explorer, selectByScope() returned false for every marker, making the entire Problems view appear empty. Fix: fall back to ON_ANY behavior when the resources array is empty and the scope depends on selection, preventing the confusing empty view state.
4ac15a8 to
6884c11
Compare
This is correct behavior, where is the problem? |







Problem
When the filter scope in the Problems view is set to a selection-dependent value (e.g., 'Selected resource', 'Same project', 'Same container') and no resource is currently selected in the Project Explorer,
selectByScope()returnsfalsefor every marker. This makes the entire Problems view appear empty — users must re-select something in the explorer to see markers again.Fix
In
MarkerFieldFilterGroup.selectByScope(), when theresourcesarray is empty and the scope depends on selection (ON_SELECTED_ONLY,ON_SELECTED_AND_CHILDREN,ON_ANY_IN_SAME_CONTAINER), fall back toON_ANYbehavior (show all) instead of returningfalse(show nothing).Files Changed
MarkerFieldFilterGroup.java— 4-line guard clause inselectByScope()MarkerFieldFilterGroupTest.java— New test class with 8 tests covering all scope + empty-resources combinationsInternalTestSuite.java— Register new test classTesting
MarkerFieldFilterGroupTestverifies all scope values with both empty and non-empty resource arraysmvn clean compile -pl :org.eclipse.ui.ide -Pbuild-individual-bundles