Skip to content

Refactor LogTabWindow and extract logic that is not needed in the GUI#558

Open
Hirogen wants to merge 10 commits intoDevelopmentfrom
refactoring
Open

Refactor LogTabWindow and extract logic that is not needed in the GUI#558
Hirogen wants to merge 10 commits intoDevelopmentfrom
refactoring

Conversation

@Hirogen
Copy link
Copy Markdown
Collaborator

@Hirogen Hirogen commented Apr 7, 2026

This pull request introduces several improvements and fixes across the codebase, focusing on enhancing test coverage, refining interface documentation, improving null handling, and updating dependencies. The most significant changes are the addition of comprehensive integration and unit tests for LogWindowCoordinator and LogWindow, interface and documentation cleanups, and minor adjustments to test expectations and SDK versions.

New and Improved Test Coverage:

Interface, Documentation, and Usability Improvements:

  • Updated the IContextMenuEntry interface: improved parameter documentation for GetMenuText, removed obsolete method overloads, and clarified remarks about null handling and parameter expectations. [1]], [2]])
  • Cleaned up the ILogWindow interface by removing a redundant summary and ensuring clarity in method documentation. ([src/LogExpert.Core/Interfaces/ILogWindow.csL150-L164])

Bug Fixes and Robustness:

  • Improved null handling in LogfileReader by ensuring that asynchronous methods return Task.FromResult<ILogLineMemory>(null) instead of null, preventing potential runtime issues. [1]], [2]])
  • Added a CopyFrom method to the SearchParams class for safe copying of search parameters between instances, with null checks. ([src/LogExpert.Core/Entities/SearchParams.csR24-R38])

Test Timeout Adjustments:

  • Increased timeout thresholds in ProjectFileValidatorTests to accommodate slower environments and reduce test flakiness. [1]], [2]])

Dependency Updates:

  • Updated the .NET SDK version in global.json from 10.0.100 to 10.0.200. ([global.jsonL3-R3])

Minor Cleanups:

These changes collectively improve reliability, maintainability, and test coverage of the codebase.


ApplyTextResources();

Rectangle led = new(0, 0, 8, 2);
Comment on lines +93 to +99
foreach (var group in HighlightGroups)
{
if (group.GroupName.Equals(groupName, StringComparison.Ordinal))
{
return group;
}
}
Comment on lines +106 to +122
foreach (var entry in _configManager.Settings.Preferences.HighlightMaskList)
{
if (entry.Mask != null)
{
try
{
if (Regex.IsMatch(fileName, entry.Mask))
{
return FindHighlightGroupByName(entry.HighlightGroupName);
}
}
catch (ArgumentException e)
{
_logger.Error($"RegEx-error while matching highlight mask: {e}");
}
}
}
Comment on lines +139 to +157
foreach (var entry in _configManager.Settings.Preferences.ColumnizerMaskList)
{
if (entry.Mask != null)
{
try
{
if (Regex.IsMatch(fileName, entry.Mask))
{
return ColumnizerPicker.FindMemorColumnizerByName(
entry.ColumnizerName,
_pluginRegistry.RegisteredColumnizers);
}
}
catch (ArgumentException e)
{
_logger.Error($"RegEx-error while finding columnizer: {e}");
}
}
}
Comment on lines +167 to +173
foreach (var columnizer in _pluginRegistry.RegisteredColumnizers)
{
if (columnizer.GetName().Equals(historyEntry.ColumnizerName, StringComparison.Ordinal))
{
return columnizer;
}
}
Comment on lines +184 to +190
foreach (var entry in _configManager.Settings.ColumnizerHistoryList)
{
if (entry.FileName.Equals(fileName, StringComparison.Ordinal))
{
return entry;
}
}
Comment on lines +207 to +216
foreach (var logWindow in _tabController.GetAllWindows())
{
if (logWindow != sender)
{
if (logWindow.ScrollToTimestamp(timestamp, false, false))
{
_ledIndicatorService.UpdateWindowActivity(logWindow, DIFF_MAX);
}
}
}
Comment on lines +209 to +215
if (logWindow != sender)
{
if (logWindow.ScrollToTimestamp(timestamp, false, false))
{
_ledIndicatorService.UpdateWindowActivity(logWindow, DIFF_MAX);
}
}
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.

1 participant