Instead of copy-pasting an existing package structure, you can create one automatically. You can do that by creating your own package structure configurations first and then applying them to your model via the Create Package Structure action.
Creating a package structure configuration
To create a package structure configuration
- Create a configuration element, which can be any named element (e.g. a Package named 'SubsystemPackages').
- Right-click the configuration element. In the shortcut menu, click Stereotype > select «packageStructureConfiguration» from the menu, and click Apply.
- Right-click the configuration element and open its Specification window.
- In the Specification window, select the Tags property group.
- Under «packageStructureConfiguration» select applyToElements and click the Create Value button.
In the Select Elements dialog, select the element types for which the Create Package Structure action will be available.
Use the Multiple Selection option to specify multiple element types.
- Under «packageStructureConfiguration» select CreateElements and click the Create Value button.
In the Value box, create a list of packages that will be created.
The packages' nesting structure should be defined using spacing as indents (see the image below). If, in addition to spacing, any indent symbols (e.g., bullet points, numbers, etc.) are used to define the structure, see Step 9.
(Optional) If the structure defined in the CreateElements tag is specified using any indent symbols (e.g., bullet points, numbers, etc.) that you do not want to include in the created packages' names, select RemoveIndentSymbols, click the Edit Value button and set it to true.
By default, the RemoveIndentSymbols tag is set to false.
- Click Close.
Creating a package structure automatically
To create a package structure automatically
Right-click an element for which you want to create the package structure defined in the configuration. In the shortcut menu, click Tools > Create Package Structure. The Select Package Structure dialog opens.
The Create Package Structure action is only available for elements specified in the applyToElements tag of the package structure configuration.
- In the Select Package Structure dialog, select the package structure configuration element that defines the package structure you want to create. Click OK.
The selected package structure is created for the element.
MagicGrid project templates contain two package structure configurations included by default. To learn more, see the Using packages page.