enhancement
major
minor
major
minor
major
#26716
WrapperGenerator: derivation of StructuredElement not for all classes of a module
A generated domain class should only extend tl:StructuredElement if its model counterpart does as well—not all classes in a module that happens to define a singleton.
Another problem: In a module’s factory, root lookup methods are generated only for exactly one singleton named “ROOT,” not for all singletons.
Code Migration
The base interface `ABase` generated for a type `A`, along with its property implementations, is moved to the implementation package. Therefore, it is best to move all *Base interfaces from the interface package in the development environment to the implementation package before the next regeneration, in order to automatically apply this refactoring to the remaining code.
Warning: If you do not perform this refactoring before the next regeneration, you may encounter compile errors after regeneration because the generated templates are not updated during the regeneration process.
The typed lookup methods for ROOT singletons are now named getRootSingleton(). The generic method getRoot() is deprecated.
Test
- test.com.top_logic.element.model.generate.TestWrapperGenerator
- Generate modules with a singleton named something other than "ROOT" and a class that does not extend StructuredElement, and generate wrappers.
- The generated code must not contain any errors.