Extract Marker Bar coordination into MarkerBarController (#719) - #722
Merged
Merged
Conversation
LogWindow.MarkerBar.cs kept ~20 marker state fields on LogWindow itself. MarkerBarController now owns the marker indexes, timer, counters and frame state behind a small IMarkerBarHost; LogWindow keeps only the wiring, the table-layout column width and its OnDpiChangedAfterParent override. Behaviour-preserving: the moved logic is unchanged apart from renames. Harmless deviations: - the filter-hit lock is only taken when the filter lane is visible - the marker column width is set after the bar's visibility and colours - marker warnings are logged under MarkerBarController instead of LogWindow HiddenLinesWindowTests reaches the click handler on the controller now; its assertions are unchanged. New MarkerBarControllerTests drive the controller through a fake host.
| } | ||
| catch (Exception exception) | ||
| { | ||
| if (!_disposed && !_host.IsClosed) |
Comment on lines
+289
to
+296
| catch (Exception exception) | ||
| { | ||
| if (!_disposed && !_host.IsClosed) | ||
| { | ||
| _logger.Warn(exception, "Marker update failed"); | ||
| _host.StatusLineError(string.Format(CultureInfo.CurrentCulture, Resources.MarkerBar_ScanFailed, exception.Message)); | ||
| } | ||
| } |
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.
Closes #719.
LogWindow.MarkerBar.cskept ~20 marker state fields onLogWindow.MarkerBarControllernow owns the marker indexes, timer, counters and frame state behind a smallIMarkerBarHost, following theVisibleRowspattern.LogWindowkeeps only the wiring, the marker column width and itsOnDpiChangedAfterParentoverride.Behaviour-preserving. The moved logic is unchanged apart from renames. Harmless deviations:
MarkerBarControllerinstead ofLogWindowTests
MarkerBarControllerTestsdrive the controller through a fake host: a stale frame is discarded, nothing renders while a rollover is pending, and a discovery error is reported once per snapshot. Each test was checked by removing the guard it targets.HiddenLinesWindowTests.MarkerClick_OnHiddenLine_RevealsItnow reaches the click handler on the controller; its assertions are unchanged.LineVisibilityTrackerTests.Dispose_CancelsAPendingScan_WithoutPublishing.