Skip to content

migrating Preferences class into stand-alone version - #1209

Open
AhmedMagedC wants to merge 1 commit into
processing:mainfrom
AhmedMagedC:standalone-preference
Open

migrating Preferences class into stand-alone version#1209
AhmedMagedC wants to merge 1 commit into
processing:mainfrom
AhmedMagedC:standalone-preference

Conversation

@AhmedMagedC

Copy link
Copy Markdown
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

@catilac

catilac commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Hi @AhmedMagedC we are finally getting to this. And it's so late. Is this something you still have the bandwidth to help with? I'm so sorry this took so long for us to get back to this. A lot of stuff has changed, and your work will need to be re-based. @diyaayay is interested in taking this over the line, but I want to confirm with you first.

@AhmedMagedC

Copy link
Copy Markdown
Contributor Author

Hi @AhmedMagedC we are finally getting to this. And it's so late. Is this something you still have the bandwidth to help with? I'm so sorry this took so long for us to get back to this. A lot of stuff has changed, and your work will need to be re-based. @diyaayay is interested in taking this over the line, but I want to confirm with you first.

Hi @catilac , Sorry I won't be available to help with this.

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

2 participants