On 22 mar, 11:49, Dimiter <
dimite...@gmail.com> wrote:
> I think that before offering solutions you should define the problems/issues.
I don't understand your criticism. Grant does point out that the
current design is unnecessarily restrictive, because extending classes
binds your implementation to those classes, and the framework they
live in (the GUI components and their ties with AWT are given as an
example). The other message you posted a few minutes before, where you
cite your own APlugIn class, is a good example of Grant's point. Why
should all plugins be forced to extend the APlugIn class, when you
could have defined an Interface instead and leave the plugins with the
liberty to inherit from some other class? For an almost entirely
abstract class such as yours, or a new hypothetical new PlugInX
interface, a better way to proceed consists in defining an interface
and possibly providing an abstract adapter class, along the lines of
what the java core classes do (Mouse*Listener/MouseAdapter etc). This
is less restrictive on the implementing code, and more easily
extensible.
This said many of the methods of your APlugIn class are interfaces I
miss strongly for current plugins, and agree they should be provided
for more usability, most notably a way to expose a help-page/usage of
the plugin, etc. Even within the current ImageJ, it would be nice to
add an interface for this (which is another example why using
interfaces makes a design so much easier to extend: plugins could
simply implement it *in addition* to PlugIn[Filter], and benefit from
the new feature).
cheers
--
Adrian