Splitting UModel Projects
You can split UModel projects into multiple subprojects and thus allow several developers to simultaneously edit different parts of a single project. Subprojects are like standard UModel project files and have the same *.ump extension. Each individual subproject can be added to a source control system. The top-level project is called the main project.
You can create a subproject from nearly any package in the main project. You can choose whether the subproject should be editable from within the main project, or be read-only. In the latter case, the subproject is editable only if you open it as a standalone project.
Subprojects can be structured in any way that you wish, in a flat or hierarchical structure, or a combination of both. This makes it theoretically possible to split off every package of a main project into subproject files.
In the Model Tree Window, subprojects appear with the respective .ump file name displayed to the right, enclosed within square brackets. For example, the project illustrated below includes several subprojects (this is the Bank_MultiLanguage.ump from the C:\Users\<username>\Documents\Altova\UModel2023\UModelExamples directory).
During the code-engineering process, all subordinate components of a subproject are considered. There is no difference between a single project file or one that consists of multiple editable subprojects. This also applies to UML diagrams—they can also be edited at the main, or subproject, level.
|Note:||You can also share packages and UML diagrams they might contain, between different projects. For more information, see Sharing Packages and Diagrams.|
To create a subproject, right-click a package, and select the command Subproject | Create new Subproject from the context menu.
Next, click Browse and select the directory where the subproject should be saved.
Select Editable to be able to edit the subproject from the main project. (Selecting Read-only makes it uneditable in the main project.)
|Note:||You can change the file path of the subproject at any time by right clicking the subproject and selecting Subproject | Edit File Path.|
Opening and editing subprojects
You can open a subproject as a standalone UModel project, directly from the main project. For this to be successful, there should not be any unresolved references to other elements. UModel automatically performs checks when creating a subproject from the "main" project, and whenever a file is saved.
To open a subproject as a standalone UModel project, right-click the subproject package in the main project and select Subproject | Open as Project. This starts another instance of UModel and opens the subproject as a "main" project. Any unresolved references are shown in the Messages window.
Subprojects that have been split off from a main project can be used in any other main project(s).
1.Open a project and select the menu command Project | Include Subproject.
2.Click the Browse button and select the *.ump file that you want to include.
3.Choose how the file is to be included; by reference or as copy.
When you save the main project file, all editable subproject files are also saved. You should therefore not create/add data (components) outside of the shared/subproject structure, if the subproject is defined as "editable" in a main project file. If data exists outside of the subproject structure, a warning message will be displayed in the Messages window.
Saving subproject files
When saving subprojects (from the main project level), all references to sibling, as well as child subprojects, are considered and saved. For example, if two sibling subprojects, "sub1" and "sub2", exist and "sub1" uses elements from "sub2", then "sub1" is saved in such a way that it automatically saves references to "sub2" as well.
If "sub1" was opened as a "main" project, then it is considered as a self contained project and can be edited without any reference to the actual main project.
Reintegrating subprojects into the main project
You can copy previously defined subprojects back into the main project again. If the subproject does not contain any diagrams then the reintegration will be immediate. If diagrams exist, a dialog box will open.
1.Right-click the subproject and select Subproject | Include as Copy. This opens the "Include Subproject" dialog box, which allows you to define the diagrams styles you want to use when including the subproject.
2.Select the style option that you want to use, and then click OK.