processing / processing/processing4
Making `Preferences` standalone
未关闭
@diyaayay 已经在做这个了。
开始于 2026年7月31日。
- 主要语言
- Java
- 星标
- 497
- 派生
- 183
- 平均合并
- 4 小时 39 分钟
- 30 天内合并 PR
- 3
描述
For the migration of the internal Gradle runner, I'm running into trouble with the Preferences class.
Problem description
Currently Preferences is tightly coupled with the PDE through the use of the Base, Messages, Toolkit and Language classes. These classes do not operate outside of the PDE, thus not allowing reuse of the Preferences class in other modules within Processing (e.g. Gradle plugins, Processing CLI, Processing pre-processor, etc.)
Proposed solution
Migrate the Preferences class to a standalone version.
- Completing the migration of Preferences to be standalone from
:appby moving it to a:app:utilsmodule. - Move functionality dependent on
:appinto aAppPreferencesclass or into other relevant areas of the PDE - Adding callback events/listeners when a preference changes
- Tests that will declare and test the functionality of
Preferences, a few of the top of my head would be:- Test if the defaults are loaded and saved without creating changes
- Test if
\work - Test if the preferences file is created if it does not yet exist
- Any other tests to make sure we have backwards compatibility
- A Github Action that will run the Tests on all supported platforms
- Bonus: Removing the dependency on
core
Steps taken so far
- In IntelliJ IDEA create a new module
utilsin theappfolder with the following settings (see image below) - Add package
processing.utilsto the newly created module - Refactoring the class by right clicking the
Prefrencesclass andRefactor -> Move Class...and moving it to the newly createdprocessing.utilspackage
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。