Enhancement
Major
Detail
Major
Detail
Major
#26716
WrapperGenerator: derivation of StructuredElement not for all classes of a module
A generated compartment class should only derive from tl:StructuredElement if its model counterpart does as well - not all classes in a module that happens to define a singleton.
Further problem: In the factory of a module, root lookup methods are generated only for exactly one singleton named "ROOT", not for all singletons.
Code migration
The base interface `ABase with the property implementations generated for a type A` is moved to the implementation package. Therefore, it is best to move all *Base interfaces in the interface package to the implementation package in the development environment before the next re-generation to apply this refactoring to the rest of the code automatically.
Caution: if you do not perform the refactoring before the next generation, you may get compile errors after the generation because the generated templates are not adjusted during the re-generation.
The typed lookup methods for ROOT singletons are now called getRootSingleton(). The generic method getRoot() is deprecated.
Test
- test.com.top_logic.element.model.generate.TestWrapperGenerator
- Create modules with singleton with a name other than "ROOT" and class that does not derive from StructuredElement and generate wrapper.
- The generated code must not have any errors.