Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AiService global #9

Merged
merged 3 commits into from
May 29, 2024
Merged

Make AiService global #9

merged 3 commits into from
May 29, 2024

Conversation

InAnYan
Copy link
Owner

@InAnYan InAnYan commented May 27, 2024

Closes #7.

I made the AiSevice live inside
JabRefGUI. It lives alongside the PreferenceService, and other classes that are often referenced in constructors.

Yes, I can't find the appropriate word for "classes that are often used in constructors", so I hope the reviewers will understand what I mean by looking at the changes (yes, I understand that's not the right way to behave).

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Copy link
Collaborator

@koppor koppor left a comment

Choose a reason for hiding this comment

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

This is kind of the "old" way - superseded by JabRef#11342, but 11342 will be part of the next release... so, let's move on with this.

@InAnYan InAnYan merged commit 5755334 into ai-1 May 29, 2024
@InAnYan
Copy link
Owner Author

InAnYan commented May 29, 2024

Okay, I checked the files again and came to conclusion:

  • Where you used a private final field and initialized it in constructor, I did the same for AiService.
  • Where you used an @Inject private final, I used it.

@koppor
Copy link
Collaborator

koppor commented May 29, 2024

@InAnYan 🤣🤣 - I think, you found out what @Contracts are offered by JabRef (these can be injecgted; the others cannot) - See koppor#687 (comment) for some more links.

I created an internal issue (https://github.com/JabRef/jabref-issue-melting-pot/issues/440) to label all "contracts" as such. - If you have capacity, you can do it using your experienced gained. IMHO, these are 3 to 5 classes being contracts or are there more?

@koppor
Copy link
Collaborator

koppor commented May 29, 2024

Other thing: Delete the merged branches. You can do it after merging, have refined github browser plugin doing it automatically, or use the branch overview now and then to delete.

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.

Make AiServices class global
2 participants