|
From: Jarek C. <jar...@po...> - 2011-11-29 17:01:58
|
W dniu 11/29/2011 05:32 PM, Alan Ezust pisze: > On Tue, Nov 29, 2011 at 12:54 AM, Matthieu Casanova > <cho...@gm... <mailto:cho...@gm...>> wrote: > > And also overriding core action may be ok, but a plugin that > override another plugin action, isn't it a bug naming problem ? > > > Yes. I don't think it should be allowed for 2 plugins to both override > the same action. But how to prevent it? I would choose simpler options, but if you want all of this functionality then: 1. 3 attributes of an action: name, actionset, registrar - all visible in shortcuts window. Registrar is empty if equal to actionset. 2. All 3 attributes remembered for a shortcut (registrar still empty in most cases). Only name if shortcut created in jedit <5.0. 3. Action called by 3 attributes 4. If registrar supplied to action invocation is null and there is more than one action matching name and actionset: following criteria could be applied: a. plugin has higher priority than core b. if 2 plugins fight for the action, first one will be picked by jedit. Implementation dependent, non-deterministic. But inside (undocumented feature) an alphabetic order can be used. Or younger wins. Non-deterministic solutions are worse in case one wants to reproduce an error. If a mistake is not hidden somewhere, then both will be possible: 1. Overriding core action by plugin 2. Choosing exact action between several with same name and actionset Jarek |