Skip to content

migrating Preferences and Messages to stand-alone version #1130

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 3 commits into
base: main
Choose a base branch
from

Conversation

AhmedMagedC
Copy link

Resolves #1104

Changes

  • migrating Preferences to :app:utils module making it independent of app module by also moving the functionalities that depends on app to AppPreferences class
  • doing the same for the Messages class to be able to use it (for example in debugging) in different areas of Processing
  • moving Utils into :app:utils, because why keeping it in app it doesn't need any functionalities from there, and also can be used in :app:utils without the need to depend on app
  • now for the platform-dependent settings location, the previously mention approach in the issue made cyclic dependency problem, so i moved the getSettingsFolder() method for each platform from :app to :app:utils, without duplication the code i made app.Platform class to depend on SettingsResolver in :app:utils to get the correct location for each platform
  • loading the defaults.txt now by using JAR resource system instead of Platform.getContentFile() (which is also marked as deprecated in the codebase encouraging to migrate to JAR RS)

Todo

  • 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

Tests

I tried to compile and run, as for now preferences are loaded and saved correctly

but for some reason some languages aren't displayed properly like: arabic , chinese, but languages like: english, japanese properly displayed.
I will look into it, but any help or suggestion of why that happens is very much appreciated

@AhmedMagedC
Copy link
Author

so for the language display issue, i suspect it happened when i renamed Preferences class to AppPreferences
the comment: # Preferences (Frame) in all PDE.properties automatically changed to # AppPreferences (Frame) leading to corruption of some files (idk why tho)

it's fixed now

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