Skip to content

MenuToolbarController added and Extracted functionality from LogTabWindow#531

Merged
Hirogen merged 7 commits intoDevelopmentfrom
menutoolbarcontroller
Feb 27, 2026
Merged

MenuToolbarController added and Extracted functionality from LogTabWindow#531
Hirogen merged 7 commits intoDevelopmentfrom
menutoolbarcontroller

Conversation

@Hirogen
Copy link
Collaborator

@Hirogen Hirogen commented Feb 27, 2026

This pull request introduces several enhancements and refactorings across the codebase, focusing on improved file history management, encoding detection, UI event handling, and test reliability. The most notable changes are the addition of a method to remove files from the history, refactoring of encoding/preamble detection logic, and improvements to UI event wiring and resource management.

File History Management

  • Added a new RemoveFromFileHistory method to ConfigManager and the IConfigManager interface, allowing files to be removed from the recent file history list in a case-insensitive manner. This is now used in the UI to support history item removal. [1] [2] [3]

Encoding and Stream Handling

  • Refactored preamble and encoding detection in PositionAwareStreamReaderBase: replaced DetectPreambleLengthAndEncoding with a new DetectPreambleLength method that returns both preamble length and detected encoding, and extracted DetermineEncoding as a static method. This improves clarity and testability. [1] [2] [3]
  • Updated new line sequence length guessing to use Span<char> for efficiency instead of strings.

UI and Event Handling

  • Refactored LogTabWindow to use a new MenuToolbarController, with explicit initialization and event wiring for menu, toolbar, and highlight group interactions. Added event handlers for history item clicks, removals, and highlight group selection, integrating with the new file history removal logic. [1] [2] [3] [4] [5]
  • Moved tab controller event handler wiring into a dedicated initialization method for better organization and maintainability. [1] [2]

Resource Management and Testing

  • Improved disposal patterns in LedIndicatorServiceTests and LogTabWindow to ensure proper cleanup of resources and prevent leaks. Updated test method calls to match new service method names (StartService, StopService). [1] [2] [3] [4] [5] [6] [7]
  • Updated test assertions in TabControllerTests for consistency and reliability, including using discard assignment (_ =) and method group syntax. [1] [2] [3] [4] [5] [6] [7] [8]

Code Cleanup

  • Removed commented-out and obsolete code, and improved code organization for better readability and maintainability. [1] [2] [3]

@Hirogen Hirogen merged commit b97762e into Development Feb 27, 2026
1 check passed
@Hirogen Hirogen deleted the menutoolbarcontroller branch February 27, 2026 11:55
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