Optimisations and Bookmark Trigger on Static Files#561
Merged
Hirogen merged 21 commits intoDevelopmentfrom Apr 11, 2026
Merged
Conversation
added 2 commits
April 10, 2026 17:10
…s' of https://github.com/LogExperts/LogExpert into 112-bug-bookmarks-are-not-working-for-highlight-triggers
precomputed EndofLine optimizations unsinged range check optimizations
…-highlight-triggers
src/LogExpert.Tests/Bookmark/HighlightBookmarkTriggerTests.cs
Dismissed
Show dismissed
Hide dismissed
…s' of https://github.com/LogExperts/LogExpert into 112-bug-bookmarks-are-not-working-for-highlight-triggers
…s' of https://github.com/LogExperts/LogExpert into 112-bug-bookmarks-are-not-working-for-highlight-triggers
added 2 commits
April 11, 2026 09:48
…s' of https://github.com/LogExperts/LogExpert into 112-bug-bookmarks-are-not-working-for-highlight-triggers
Closed
src/LogExpert.Tests/Bookmark/HighlightBookmarkScannerTests.cs
Dismissed
Show dismissed
Hide dismissed
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; | ||
| } | ||
| } |
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.
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
Bookmarkentity 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
HighlightBookmarkScannerthat scans log lines for highlight rules withIsSetBookmarkenabled, generating a list of auto-generated bookmarks without UI dependencies. This includes logic to match highlight entries, resolve bookmark comments, and report progress.Bookmarkentity withIsAutoGeneratedandSourceHighlightTextproperties to distinguish auto-generated bookmarks and track the highlight rule that triggered them. Also added a factory methodCreateAutoGeneratedfor easy instantiation. [1] [2]BookmarkDataProvider:RemoveAutoGeneratedBookmarksto remove all auto-generated bookmarks and fire the appropriate event.ConvertToManualBookmarkto convert an auto-generated bookmark at a given line to a manual one.AddBookmarksfor efficient batch addition of bookmarks, firing the event only once. [1] [2]Localization and UI Feedback
Other Codebase Improvements
FilterCancelHandlerand 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.