Hi Ede,

I'm on the way of upgrading extensions to make them work with recent changes.

It will probably take some time as every single plugin is impacted.

As far as I can see, I18N can now be used from extensions, thank you for that. I'll close the ticket, but before that, I'd like to upgrade a whole extension, and at the moment, I'm still annoyed with some changes you did in AbstractPlugIn that I would like to fully understand (or change).

A PlugInContext is now requested in AbstractPlugIn 

line 414 : if (context == null) throw new RuntimeException("Add super.initialize() to your AbstractPlugIn.initialize() implementation!\n"+this.getClass().getName());

I have questions about the why and the how :

why : AbstractPlugIn used to take a PlugInContext argument at execution time (method execute). Seems that adding it as an attribute is convenient but I'm not sure it is needed. For example, I think ToolboxPlugIn does not use initialization, so inheriting getContext which needs this attribute is error prone. Note that I probably wouldn't have notice it if it didn't cause trouble during old plugins migration

how : if an old plugin does not use super.initialize(), nothing break at compile time. Application starts normally but the UI can definitely break down if you try to use the plugin (in my case, cursor tools won't work any more). The logged message is quite clear but for such a breaking error, a dialog box would be needed.

Let see

- if a context is something really needed by all plugins

- if it is needed (or definitely wanted) : how can we force the implementation in all children or avoid broken implementation in a safer way

Thanks 

Michaël 

_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to