Skip to content

Filter options for errors panel#2464

Merged
bfiete merged 11 commits into
beefytech:masterfrom
aharabada:Filter-Errors-Panel
Jun 14, 2026
Merged

Filter options for errors panel#2464
bfiete merged 11 commits into
beefytech:masterfrom
aharabada:Filter-Errors-Panel

Conversation

@aharabada

Copy link
Copy Markdown
Contributor

This has been on my wishlist for ages, and I finally found some time to make it happen.

This PR adds several filter options to the errors panel that you usually find in other IDEs.

The following filter options were added:

  1. A drop-down to select the scope of errors:
    • Entire Workspace: Shows all errors
    • Current File: Only shows errors for the document that is currently focused
    • Current Project: Only shows errors for the project that the "current file" belongs to
    • Open Files: Only shows errors for all documents that are currently opened
  2. Toggle buttons to show or hide errors or warnings
    These buttons also show how many errors and warnings the entire workspace has, as well as how many match the current filter settings.
  3. Search box to filter error messages by text. This will match:
    • Description
    • Project name
    • File name
    • The number in the error-code column
  4. Allow sorting the error list by clicking the column-headers
    • Shift-clicking allows sorting by multiple columns at the same time
    • implemented default order: Project -> File -> Line (which is the default for Visual Studio)

Images:

Here are some images:
ErrorsPanel

Only show errors:
ErrorsPanel_onlyErrors

Text search:
ErrorsPanel_textSearch

Error code search:
ErrorsPanel_searchCode

Open Questions:

  1. I have a question about the SearchEditWidget: It has a hard-coded content shift to make space for the search icon. However the icon is rendered "manually" in PropertiesDialog.DrawAll:
    if (mSearchEdit != null)
    {
    g.Draw(DarkTheme.sDarkTheme.GetImage(.Search), mSearchEdit.mX + GS!(2), mSearchEdit.mY + GS!(1));
    }
    I mimicked this behavior in ErrorsPanel.DrawAll. I was wondering, if there was a reason to not override the Draw-Method for SearchEditWidget and render the icon in there?
  2. I merged parse and resolve errors into a single sorted list before generating the list view items. Previously, parse errors always appeared above the resolve errors. Was that original top-ordering intentional? If so, I can restore it for the default sort order.
    if (!mParseErrors.IsEmpty)
    {
    List<String> paths = scope .();
    for (var path in mParseErrors.Keys)
    paths.Add(path);
    paths.Sort();
    for (var path in paths)
    {
    for (var error in mParseErrors[path])
    HandleError(error);
    }
    }
    for (let error in mResolveErrors)
    HandleError(error);

@bfiete

bfiete commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator
  1. Hm, I'm not quite sure why I did it that way. Either there was a good reason that I can't recall or I made the wrong choice there.
  2. The idea would have been that resolve errors can result from earlier parsing errors, so I considered parsing errors to be possibly a kind of "root" error and thus more important, and was prioritizing those by showing them first. I'm not particularly tied to that reasoning, however, and I don't even use the error panel personally.

@bfiete bfiete merged commit 512c7df into beefytech:master Jun 14, 2026
7 checks passed
@bfiete

bfiete commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Seems pretty good! I made a small tweak to the combo box size so it matches the others (ie: platform and config selector on the lower right)

@aharabada

Copy link
Copy Markdown
Contributor Author

Ah, good catch. They did match at some point, but I had changed the toolbar height kind of last minute

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