Spade-Editor / Spade

Cross-platform raster graphics editor inspired by Paint.NET
GNU General Public License v3.0
41 stars 10 forks source link

Complete plugin system #51

Closed HeroesGrave closed 9 years ago

HeroesGrave commented 9 years ago

Rewrote the plugin manager. Now plugins can be loaded from file or just registered within the application itself, making developing plugins a lot easier.

There is also backwards and some forwards compatibility for plugins that just add editing functions through the supported mechanism.

Also started moving (nearly) all the editing functions to a 'Core' plugin.

HeroesGrave commented 9 years ago

Closing because new additions can be added in a backwards compatible way.

BurntPizza commented 9 years ago

Can plugins be auto-loaded? That's what I'm looking into right now. I would like to remove the whole "launchWithPlugins" and instead just always scan and auto-load. It would scan both the PDJ jar itself (for bundled plugins, like Core is currently) as well as the directory PDJ is in for .plugin files.

Currently no more than 1 plugin (e.g. Core) can be used at a time, right? Not acceptable.

HeroesGrave commented 9 years ago

It checks the ./plugins/ (EDIT: and ~/.paint-java/plugins) folder for plugins as well as any plugins loaded at launch.

Developing two plugins at once is a bit tricky. You need to export one into the plugin folder, and then work on the other.

HeroesGrave commented 9 years ago

I also need to write a guide on how to export plugins. The general idea is that you export a (non-runnable jar) with only the src folder (no libraries).

HeroesGrave commented 9 years ago

Also you can have the same plugin in the plugins folder and loaded with launchWithPlugins(). The latest version will be preferred, and if both are the same, then the one loaded with launchWithPlugins() will take priority.