Skip to content

migrating Preferences class into stand-alone version #1209

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AhmedMagedC
Copy link
Contributor

Resolves #1104

Changes

  • breaks the Preferences class into two classes: app.utils.Preferences and app.Preferences
  • app.utils.Preferences class is the stand-alone version making the loading and saving of preferences independent
  • app.Preferences depends on app.utils.Preferences for the main functionalties (loading, saving, getting a value) but also adds other app dependent functionalties (fonts, language, ...)
  • gracefully handles exceptions by adding a centralized custom Exception: PreferencesException
  • loading of default.txt is now via JAR resource system

Todo

  • the SettingFolder location depends on the Base class, which forces you to explicitly set the location when using app.utils.Preferences. We can decouple it from Base class making it independt of app module
  • Adding callback events/listeners when a preference changes
  • Tests that will declare and test the functionality of Preferences
  • A Github Action that will run the Tests on all supported platforms

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.

Making Preferences standalone
1 participant