Importing elements between projects

 

The "Import" dialog box

The "Import" dialog box (shown in Figure 18) allows the selection of a project and details its content, presented in the form of a hierarchical explorer.

 

Figure 18. The "Import" window and its components

 

Description:

1.      Selected project.

2.      Components of the selected project. To display the components of a given project, simply click on the + boxes in the tree structure.

 

 

Imported objects

Component elements, which appear when you click on the "+" boxes in the "Import" window tree structure, are listed in the following order: packages and classes.  The import will fail if there is any inconsistency between imported elements.

 

Object ...

imported component elements...

Project

the whole project (packages, classes, ...)

Package

classes (with their operations, attributes, "visible" associations), documents, tagged values, diagrams

Class

operations, attributes, "visible" associations, documents, tagged values, diagrams

 

 

Non-imported objects are:

·         reference links from a package to another element which is not imported and which does not already exist in the current project

·         non-oriented associations (visibility NULL on both sides)

 

Note:      Before importing an element, the check-out command must be run on the UML model root, in non-hierarchical mode.

 

 

Example of an import

Figure 19 shows how to carry out an import from a package into the current project.

 

Figure 19. Example of an import of a package into a project

 

Steps:

1.      Click on the "File/Import" menu.  The "Import" window then appears.

2.      In the "Source project" field, select the project from which you want to import elements. 

3.      In the "Elements to import" zone, select the packages/classes you wish to import.

4.      Click on the "Import" button to begin the import operation.

 

The selected package is then imported into your current project.  The "Import" window remains open, in case you wish to import other elements.  If this is not the case, simply close the window.

 

Note:      The selection of a project from the list of components replaces the current project by the selected project.  It deletes those elements in the current project which do not exist in the selected project, replaces those which exist in the two projects and adds those which did not already exist in the current project.

 

 

Repetition at the root

After every import, and each time an operation is run, the Objecteering Multi-user MDAC checks if there is element repetition at the root (for example, if you try to import a package named "MyPackage" into a package also named "MyPackage").  If the MDAC detects repeated elements at the root, the import operation is cancelled and the Objecteering Multi-user MDAC:

·         checks that the repeated element has not been imported into the repository

·         provides you with a list of repeated elements, as well as information on their presence in or absence from the repository

·         recommends that you quit and then restart Objecteering, and then regenerate the repository from a sound database