Merged
Conversation
…timizing_painting
…e the code to the PaintHelper and remove the duplicated code
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the painting logic in PaintHelper to remove duplicated code and centralize color/brush selection, and cleans up unused renderer classes and project file entries.
- Refactored
PaintHelper.CellPaintingsignature and moved repeated background/selection logic into new helper methods (GetBackColorFromHighlightEntry,GetBrushForFocusedControl, etc.). - Deleted redundant
ToolStriprenderer and separator extension classes now covered by unified drawing logic. - Cleaned up
.csprojto remove duplicate resource includes.
Reviewed Changes
Copilot reviewed 29 out of 43 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/LogExpert.UI/LogExpert.UI.csproj | Removed obsolete <EmbeddedResource> and <Compile> items. |
| src/LogExpert.UI/Entities/PaintHelper.cs | Centralized cell-paint logic, added helper methods. |
| src/LogExpert.UI/Extensions/Forms/*.cs | Deleted duplicated custom renderer/separator classes. |
| src/LogExpert.UI/Dialogs/HighlightDialog.cs | Updated item drawing to use PaintHelper color helpers. |
| src/LogExpert.UI/Dialogs/BookmarkWindow.cs | Wired new CellPainting signature; renamed fields/events. |
| src/LogExpert.UI/Controls/LogWindow/* | Updated calls to CellPainting with new parameters. |
| src/LogExpert.UI/Controls/ColorComboBox.cs | Converted manual Items.Add calls to collection literal. |
| src/LogExpert.Core/Interface/ILogWindow.cs | Added new GetLogLineWithWait method; cleaned up signatures. |
| src/LogExpert.Core/EventArguments/BookmarkEventArgs.cs | Fixed class declaration syntax and namespace imports. |
| src/LogExpert.Core/Entities/SearchParams.cs | Adjusted namespace to LogExpert.Entities. |
| src/LogExpert.Core/Config/Settings.cs | Adjusted namespace import for SearchParams. |
| src/ColumnizerLib/Extensions/LogLineExtensions.cs | Fixed namespace and TODO comment. |
| global.json | Bumped SDK from 9.0.101 to 9.0.301. |
| .github/workflows/test_dotnet.yml | Updated .NET version from 8.0.x to 9.0.x. |
Files not reviewed (5)
- src/LogExpert.UI/Controls/LogWindow/LogWindow.designer.cs: Language not supported
- src/LogExpert.UI/Controls/LogWindow/PatternWindow.Designer.cs: Language not supported
- src/LogExpert.UI/Controls/LogWindow/TimeSpreadigControl.Designer.cs: Language not supported
- src/LogExpert.UI/Dialogs/BookmarkWindow.Designer.cs: Language not supported
- src/LogExpert.UI/Dialogs/LogTabWindow/LogTabWindow.designer.cs: Language not supported
Comments suppressed due to low confidence (1)
src/LogExpert.UI/Entities/PaintHelper.cs:523
- Initializing
mergedListas an array literal[]will make it a fixed-size array, causingAddcalls to throw. Use a mutable list, e.g.,var mergedList = new List<HighlightMatchEntry>();.
IList<HighlightMatchEntry> mergedList = [];
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts: # src/LogExpert.UI/Entities/PaintHelper.cs
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 just removes duplicated code from CellPainting, but i needs the #424 to be merged first, as it includes all the changes from this one, as a prerequisite