Skip to content

重写 MappedObservableList#5400

Merged
Glavo merged 6 commits intoHMCL-dev:mainfrom
Glavo:mapped-list
Feb 5, 2026
Merged

重写 MappedObservableList#5400
Glavo merged 6 commits intoHMCL-dev:mainfrom
Glavo:mapped-list

Conversation

@Glavo
Copy link
Member

@Glavo Glavo commented Feb 3, 2026

No description provided.

@Glavo Glavo force-pushed the mapped-list branch 2 times, most recently from 793db26 to c695c00 Compare February 3, 2026 11:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rewrites the MappedObservableList class to extend JavaFX's TransformationList instead of using a custom listener-based synchronization mechanism. This modernizes the implementation to align with standard JavaFX transformation list patterns.

Changes:

  • Refactored MappedObservableList to extend TransformationList<E, F> instead of using a separate synchronized list
  • Updated copyright year from 2020 to 2026
  • Changed documentation style from /** */ to /// to match newer codebase conventions
  • Added comprehensive test suite covering all list operations (add, remove, set, sort, permutation, update)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
HMCLCore/src/main/java/org/jackhuang/hmcl/util/javafx/MappedObservableList.java Rewritten to extend TransformationList, providing a cleaner implementation that properly handles all list change types (permutation, update, add, remove) while maintaining API compatibility
HMCLCore/src/test/java/org/jackhuang/hmcl/util/javafx/MappedObservableListTest.java New comprehensive test suite with 12 test methods covering initial mapping, modifications, permutations, and edge cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Glavo Glavo merged commit 5839382 into HMCL-dev:main Feb 5, 2026
8 checks passed
@Glavo Glavo deleted the mapped-list branch February 5, 2026 16:22
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.

2 participants