Skip to content

Refact 13.12#21

Open
koder95 wants to merge 19 commits into
refact-2025from
refact-2025-12-13
Open

Refact 13.12#21
koder95 wants to merge 19 commits into
refact-2025from
refact-2025-12-13

Conversation

@koder95

@koder95 koder95 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

No description provided.

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.
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 800ab369-bd38-4484-9672-04d3f17d6936

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refact-2025-12-13

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +13 to +14
if (node == null || node.getNodeName().equalsIgnoreCase("index")) {
throw new IllegalArgumentException("Node is null or node is not an index");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment thread src/main/java/pl/koder95/eme/dfs/Index.java Outdated
Comment on lines +56 to +57
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

koder95 and others added 2 commits July 7, 2026 22:49
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.
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