Ticket #781 (closed assessed: fixed)
Disabled plug-ins are still activated
Reported by: | jeroens | Owned by: | jeroens |
---|---|---|---|
Priority: | normal | Milestone: | Ecopath 6: release 6.1.1 |
Component: | Overall Plugins | Version: | |
Severity: | minor | Keywords: | |
Cc: |
Description
To reproduce:
- In EwE Options > plugins, disable any plug-in
- Restart EwE
- The new plug-in will be active in the UI
- In EwE Options > plugins, check that the plug-in is flagged as disabled
Change History
comment:2 Changed 14 years ago by jeroens
Ok, lovely... when trying to solve bug #748 (http://sources.ecopath.org/trac/Ecopath/ticket/748), plugin assembly enable/disable dynamics were removed which stopped the UI from dynamically responding to plug-in assembly changes. However, this 'fix' introduced this very bug:
The UI plugin handlers were relying on a plugin to get disabled AFTER loading in order for menu items to disappear from the UI!
The plugin enabled/disabled system has the fundamental flaw that loaded plug-ins are immediately integrated in the UI before the plug-in manager is told to disable specific plug-ins. This can only be fixed by letting the plug-in manager maintain the enabled/disabled settings which will be assessed during plug-in loading.
comment:3 Changed 14 years ago by jeroens
- Status changed from new to closed
- Resolution set to fixed
Fixed the fundamental flaw; the plug-in manager assess at startup which plug-ins are allowed to work, and only those plug-ins are loaded and can be queried for plug-in points. If a plug-in stops working the plug-in manager can decide to shut the plug-in down.
This is not easy to fix; plugin assemblies need to be loaded for the options interface to enable/disable them, but the plug-in invocation mechanism bypasses the plugin assembly registration structure.