Book a Demo
Prev Next

Import a Directory Structure

You can import from all source files in a complete directory structure, which enables you to import or synchronize multiple files in a directory tree in one pass.

Enterprise Architect creates the necessary Packages and diagrams during the import process.

Access

Ribbon

Develop > Source Code > Files > Import Source Directory

Keyboard Shortcuts

Ctrl+Shift+U

Import a directory structure, using the 'Import Source Directory' dialog

Field

Action

See also

Root directory

Type in or browse for the name of the directory to import.

Classes not found during Import

Source Type

Type in or select from the drop-down list the coding language of the files to import in the source directory.

File

Type in or select from the drop-down list, the file extensions to include in the import. Use a ';' to separate values.

Perform a Dry Run

If you want to perform the import as a dry run when you click on the OK button, select this check box. When processing is complete, click on the View Log button to check the predicted outcome of the process.

Recursively Process Subdirectories

If you want to include the contents of subdirectories in the import process, select this check box.

Import components from

If you want to import additional files (as described in the 'Import Component Types' dialog) select this checkbox. You then complete the prompt to specify where the components will come from.

Import Component Types

Do not import private members

If you want to exclude private members from the model when importing libraries, select this checkbox.

Prompt for Missing Macro Definitions

During the import, the parser might encounter unrecognized macros. If you select this check box, you will be prompted when such an event occurs and will have the opportunity to define the macro. If you do not select this option, the resultant Package structure could be missing certain items.

Package Structure

Select the appropriate radio button to create a Package for every directory, every namespace or every file; this might be restricted depending on the source type selected.

Create Diagram for each Package

Select this checkbox to create a diagram in each Package created in the import. Click on the Options button to identify which element features to include on the diagrams.

Synchronization

Select the appropriate radio button to synchronize existing classes or overwrite existing classes.

If a model Class is found that matches the one in code:

  • 'Synchronize' updates the model Class to include the details from the one in code, which preserves information not represented in code, such as the location of Classes in diagrams
  • 'Overwrite' deletes the model Class and generates a new one from code; any additional information is not preserved.

If the option 'Use timestamps' is selected, then the representation with the latest time stamp (either model or code) will take precedence.

Remove Classes not found in code

Select the appropriate radio button to specify how to handle existing model classes that are not present in the imported code.

  • 'Never delete' retains all existing Classes in the model.
  • 'Prompt for action' enables you to review Classes individually
  • 'Always' delete' removes from the model any Class that is not present in the imported code.

OK

Click on this button to start the import.