Skip to content

Optimisations and Bookmark Trigger on Static Files#561

Merged
Hirogen merged 21 commits intoDevelopmentfrom
112-bug-bookmarks-are-not-working-for-highlight-triggers
Apr 11, 2026
Merged

Optimisations and Bookmark Trigger on Static Files#561
Hirogen merged 21 commits intoDevelopmentfrom
112-bug-bookmarks-are-not-working-for-highlight-triggers

Conversation

@Hirogen
Copy link
Copy Markdown
Collaborator

@Hirogen Hirogen commented Apr 10, 2026

This pull request introduces significant improvements to the bookmark system, especially around auto-generated bookmarks created by highlight rules. It adds a dedicated scanner for generating bookmarks from highlight matches, extends the Bookmark entity to track their origin, and enhances the bookmark management API for batch operations and conversions. Additionally, new resource strings are added for better UI feedback and localization.

Bookmark System Enhancements

  • Added a new static class HighlightBookmarkScanner that scans log lines for highlight rules with IsSetBookmark enabled, generating a list of auto-generated bookmarks without UI dependencies. This includes logic to match highlight entries, resolve bookmark comments, and report progress.
  • Extended the Bookmark entity with IsAutoGenerated and SourceHighlightText properties to distinguish auto-generated bookmarks and track the highlight rule that triggered them. Also added a factory method CreateAutoGenerated for easy instantiation. [1] [2]
  • Added new API methods to BookmarkDataProvider:
    • RemoveAutoGeneratedBookmarks to remove all auto-generated bookmarks and fire the appropriate event.
    • ConvertToManualBookmark to convert an auto-generated bookmark at a given line to a manual one.
    • AddBookmarks for efficient batch addition of bookmarks, firing the event only once. [1] [2]

Localization and UI Feedback

  • Added new resource strings for bookmark scanning progress and source highlight information in English, German, and Chinese resource files, supporting improved feedback and display in the UI. [1] [2] [3] [4] [5] [6]

Other Codebase Improvements

  • Minor code cleanups and adjustments, such as switching to primary constructor syntax in FilterCancelHandler and clarifying comments and method placements for maintainability. (F5da5e7aL6R6, [1] [2] [3] [4] [5] [6]

These changes lay the groundwork for more robust, user-friendly, and localized bookmark handling, particularly for workflows involving automated highlight-based bookmarks.

@Hirogen Hirogen changed the title Refactor BufferedDataGridView by removing unused functions Optimisations and Bookmark Trigger on Static Files Apr 10, 2026
BRUNER Patrick added 2 commits April 11, 2026 09:48
@Hirogen Hirogen linked an issue Apr 11, 2026 that may be closed by this pull request
@Hirogen Hirogen linked an issue Apr 11, 2026 that may be closed by this pull request
Comment on lines +245 to +252
foreach (var bookmark in bookmarks)
{
if (!BookmarkList.ContainsKey(bookmark.LineNum))
{
BookmarkList.Add(bookmark.LineNum, bookmark);
added++;
}
}
Comment on lines +686 to +692
foreach (var kvp in provider.BookmarkList)
{
if (!kvp.Value.IsAutoGenerated)
{
manualBookmarks.Add(kvp.Key, kvp.Value);
}
}
Comment on lines +711 to +717
foreach (var kvp in provider.BookmarkList)
{
if (!kvp.Value.IsAutoGenerated)
{
manualBookmarks.Add(kvp.Key, kvp.Value);
}
}
Comment on lines +6298 to +6304
foreach (var kvp in _bookmarkProvider.BookmarkList)
{
if (!kvp.Value.IsAutoGenerated)
{
manualBookmarks.Add(kvp.Key, kvp.Value);
}
}
Comment on lines +7096 to +7102
foreach (var entry in matchingList)
{
if (entry.IsSetBookmark)
{
return entry.SearchText;
}
}
@Hirogen Hirogen merged commit cbc45d1 into Development Apr 11, 2026
1 check passed
@Hirogen Hirogen deleted the 112-bug-bookmarks-are-not-working-for-highlight-triggers branch April 11, 2026 07:58
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.

Bookmark comment column Bug: Bookmarks are not working for highlight triggers

1 participant