Refact 13.12#21
Conversation
Dodanie domyślnych implementacji metod
Usunięcie implementacji metod, które mają swoje domyślne implementacje
Introduced module-info.java to enable Java module system, moved JavaFX Application logic from Main.java to new App.java, and updated pom.xml to use Java 21 and latest JavaFX, ControlsFX, and GitHub API dependencies. This refactor modernizes the project structure, improves maintainability, and prepares the application for future enhancements.
Extracted unnamed parameter check into a helper method and refactored update logic in the start method for clarity. Introduced an overloaded start method to handle update scenarios more cleanly and improved readability by reducing inline logic.
Refactored the Index class to centralize data initialization and attribute interpretation. Introduced a static interpret method for attribute extraction and updated constructors to use this method, improving code clarity and immutability of the data map. Add create method to Index for data map Introduces a static create method to the Index class, allowing instantiation from a data map. The method returns null if the map is null or missing the 'an' key, improving safety and convenience when creating Index objects from map data. Refactor Index.create to simplify validation logic Removed the separate validate method and integrated its logic into the create method by delegating to another create overload. This streamlines the creation and validation process for Index instances.
Introduced the IndexFactory interface and two implementations: BasicIndexFactory and StandardIndexFactory. These classes provide a flexible way to create Index objects based on input data and book type matching logic.
Moved the progress dialog and index list reloading logic from PersonalDataView to a new ProgressDialog class for better separation of concerns. Refactored PersonalDataView to use the new ProgressDialog and improved method structure for input handling and auto-completion.
Refactored the Index class to centralize data initialization and attribute interpretation. Introduced a static interpret method for attribute extraction and updated constructors to use this method, improving code clarity and immutability of the data map.
Introduces a static create method to the Index class, allowing instantiation from a data map. The method returns null if the map is null or missing the 'an' key, improving safety and convenience when creating Index objects from map data.
Removed the separate validate method and integrated its logic into the create method by delegating to another create overload. This streamlines the creation and validation process for Index instances.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14ddddee9a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (node == null || node.getNodeName().equalsIgnoreCase("index")) { | ||
| throw new IllegalArgumentException("Node is null or node is not an index"); |
There was a problem hiding this comment.
Accept valid index nodes instead of throwing
When Book.load() passes a real <index ...> node through Index.create(), the node-name check succeeds and this interpreter is called, but this condition throws exactly for nodes named index. Any existing indices.xml containing at least one valid index now aborts startup/loading instead of importing acts.
Useful? React with 👍 / 👎.
| } | ||
| } |
There was a problem hiding this comment.
Reset cached books when reloading data
The new reload path clears each IndexList and calls load(), but IndexList.load() only rereads indices.xml when the static BOOKS cache is null. After startup, choosing the new reload menu repopulates from the same cached books, so edits to the XML file are not picked up.
Useful? React with 👍 / 👎.
Introduces ApplicationContext as a lightweight IoC container for managing application dependencies. Reorganizes domain models (ActNumber, Book, Index) into pl.koder95.eme.domain.index package. Creates new application services layer (PersonalDataQueryService, AppCloseService, IndexReloadService) and bootstrap configuration (AppConfig). Refactors App and PersonalDataView to use constructor-injected dependencies instead of static references. Adds IndexRepository abstraction with InMemoryIndexRepository implementation for managing index data lifecycle. Updates various core classes to use new domain models.
No description provided.