Closed corranwebster closed 2 years ago
Note that while there is a more immediate need of this change, this opens up the possibility of using Schemas in TraitsUI instead of directly creating pyface.action objects.
Only thing I notice is that we still have a
Instance("pyface.tasks.action.schema_addition.SchemaAddition")
intasks_application.py
which could instead beInstance("pyface.action.schema.schema_addition.SchemaAddition")
Good catch - my search only looked for imports.
Corrected, and I will merge after this.
Schemas are generic, this PR moves the Schema code out of pyface.tasks and into pyface.action, making it available for use outside of tasks. Additionally a version of
ActionManagerBuilder
is included to provide a Tasks-independent way of assembling the Schemas into action managers, which fixes #658.Additionally, the code is slightly modified so that it does not import toolkit code as a side-effect.
The old locations are kept so imports should still work. They will be removed at some yet-to-be-determined future point.