Major
#27195
Model editor: sub-structuring of modules
The modules tabulated in the Model Editor are confusing because the custom application module(s) are mixed somewhere among the built-in TopLogic modules.
Improvement
Display modules themselves also as a tree
TopLogic +- Base types +- Model +- ... Demo +- DemoTypes +- DemoPlain +- ... Test +- ... MyApp +- MyModule1 +- Mymodule2
Conversion
The type tree of the model editor now uses a similar representation as the hieraric display of the package explorer of a common IDE like Eclipse.
The module name specifies the structure of the tree. The name is broken down into individual parts, separated by a period. For each of these parts a new node is created.
For example, if a module exists with the name tl.core.FooBar, then a node with the name tl is created that contains a child tl.core, which in turn has the module tl.core.FooBar. If the tl node has no other child besides tl.core, then the tl node is removed.
Instead of adjusting the name of modules (+ a "major" migration) to change the structure in the model editor, the annotation tl:TLModuleDisplayGroup can be used, which is first evaluated to determine the group of the module in which it is grouped. If this annotation does not exist, the technical name of the module is used.
Code migration
Paths in scripted tests need to be adjusted when navigating in the Model Editor subject object tree, because the structure has changed.
Test
- Create a new module with the name com.mycompany.FooBar. The module should be found under the path com > mycompany > Foo Bar.
- Create a new module with the name com.mycompany.FooBar and enter Hallo Welt as the German label (translation service turned off). The module should be found under the path com > mycompany > Hallo Welt. The label of the module should have as German and English translation Hallo Welt.
- Create a new module with the name com.mycompany.FooBar and enter Hello World as the English label (translation service switched off). The module should be found under the path com > mycompany > Hello World. The label of the module should have Hello World as german and english translation.
- Create a new module with the name com.mycompany.FooBar and enter Hello World as the German label and Hello World as the English label (translation service switched on) and check whether the other translations of the module's label have been added correctly.