Skip to content

Fix vanishing markers when no resource is selected in Problems view#3862

Closed
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:improve-filter-dialog
Closed

Fix vanishing markers when no resource is selected in Problems view#3862
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:improve-filter-dialog

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 3, 2026

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() returns false for 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 the resources array is empty and the scope depends on selection (ON_SELECTED_ONLY, ON_SELECTED_AND_CHILDREN, ON_ANY_IN_SAME_CONTAINER), fall back to ON_ANY behavior (show all) instead of returning false (show nothing).

Files Changed

  • MarkerFieldFilterGroup.java — 4-line guard clause in selectByScope()
  • MarkerFieldFilterGroupTest.java — New test class with 8 tests covering all scope + empty-resources combinations
  • InternalTestSuite.java — Register new test class

Testing

  • New MarkerFieldFilterGroupTest verifies all scope values with both empty and non-empty resource arrays
  • Verified compilation with mvn clean compile -pl :org.eclipse.ui.ide -Pbuild-individual-bundles

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

Test Results

   852 files     852 suites   52m 47s ⏱️
 7 902 tests  7 659 ✅ 243 💤 0 ❌
20 208 runs  19 553 ✅ 655 💤 0 ❌

Results for commit 4ac15a8.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the improve-filter-dialog branch 2 times, most recently from 2e0b3b0 to ed50b35 Compare April 5, 2026 14:27
@eclipse-eca-validation
Copy link
Copy Markdown

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:

  • Committing user must have an Eclipse Account
  • Author must have an Eclipse Account

To resolve this, please:

  1. Sign in or create an Eclipse Foundation account: https://accounts.eclipse.org/user/eca
  2. Ensure your GitHub username is linked to your Eclipse account
  3. Complete and submit the ECA form

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!

@vogella vogella force-pushed the improve-filter-dialog branch 3 times, most recently from a9de653 to 689b185 Compare April 5, 2026 17:39
@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 5, 2026

Old:

image

No indicator that the detailed selection does not count:

image

New:

Show all indicates that the other UI elements are disabled:

image

Scope is drop-down box to save space

image

Types can be extended as drop-down.

image

@vogella vogella force-pushed the improve-filter-dialog branch 2 times, most recently from 963b443 to 4ac15a8 Compare April 8, 2026 07:17
@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 10, 2026

Latest UI

image image

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.
@vogella vogella force-pushed the improve-filter-dialog branch from 4ac15a8 to 6884c11 Compare April 15, 2026 16:15
@vogella vogella changed the title Improve Problems view filter dialog UX and fix vanishing markers Fix vanishing markers when no resource is selected in Problems view Apr 15, 2026
@iloveeclipse
Copy link
Copy Markdown
Member

and no resource is currently selected in the Project Explorer, selectByScope() returns false for every marker. This makes the entire Problems view appear empty — users must re-select something in the explorer to see markers again.

This is correct behavior, where is the problem?
Now assume the workspace has 1000 projects, each 100 markers, according to this proposal, if nothing is selected, one would see 100.000 problems in the Problems view? Why should it be better, for which use case should it be helpful?

@vogella vogella closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants