Import Controlled Model Branch
It might be necessary to either:
- Retrieve a model branch created by another user in a private copy of a model, to import it into your own private copy of the same model or
- Retrieve a model branch that is common in many models, for inclusion in a new model.
Applying version control to an Enterprise Architect model can result in many XMI files placed under version control. It could then be hard to locate and import the file corresponding to the root of a particular model branch. Enterprise Architect's Model Branch files overcome this problem by simplifying the retrieval of model hierarchies for use in other models.
The Import a Model Branch context menu option uses Enterprise Architect's Model Branch Files, of which there are few, to retrieve information about the root package file and import the model branch. The Model Branch File records information such as the name and type of the version control configuration for the selected package, and the relative filename of the version controlled XMI file associated with the package.
Before attempting to import a model branch, you must have access to the version controlled XMI files that represent the model branch to be imported. That is, there must be a working copy folder, accessible from the machine on which Enterprise Architect is running, that is associated with the Version Control repository containing those XMI files.
It is not necessary to have the relevant Version Control Configuration set up within Enterprise Architect before issuing this command - Enterprise Architect prompts you to complete specification of the configuration if necessary.
The Import a Model Branch context menu option is only enabled for packages that you (the current user) are able to edit, as the imported model branch is inserted into the model under the selected package.
To import a model branch, follow the steps below:
- Right-click on the package into which the model branch is to be imported.
- Select the Package Control | Import a Model Branch context menu option. The Import VC Model Branch dialog displays.
- Click on the Find a Model Branch (.EAB) file button and browse for the Model Branch File. If the version control configuration used by the file has not been fully set up, Enterprise Architect prompts you to complete and save the configuration. The model branch import then proceeds. OR
- If the version control configuration used by the file has been fully set up in the current model, click on the drop-down arrow in the Select a Version Control Configuration field and select the configuration, then select the Model Branch File from the Select a Model Branch (.EAB) file list. Click on the OK button to import the model branch.
Enterprise Architect imports the root package specified in the Model Branch File and recursively imports and populates all the sub-packages contained in the root package.