jmvs

0002 Plugin architecture via properties and reflection

Status: Accepted; partially realised

Superseded by ADR 0006.

Context

README (2003): the code was “refactored … around a plugin-oriented idea, more configurable, though never took this idea to its full extent, i.e. 3rd parties being able to drop in plugin jars”.

Decision

Display modes implement JMVSPlugin. jmvs.properties lists them (plugin.list=balls,ribbons,sticks) with plugin.<id>.class=<FQCN>. AppearanceManager.initialisePlugins instantiates via Class.forName(...).newInstance() and calls init(Properties). The menu is built from each plugin’s getName() and getPaintModes(); JMVSPanel identifies selections by menu label.

Consequences

Rationale: stated in README.