Package mapping for Visual Basic (Visual Basic code)
For each Package, ACS generates a subfolder, namespace and/or Visual Basic unit file:
• If the Package mapping is Namespace and the «VB Unit» stereotype is not applied, ACS generates a namespace declaration in the appropriate Visual Basic unit file. No subfolder is created.
• If the Package mapping is Namespace and the «VB Unit» stereotype is applied, ACS generates a Visual Basic unit file for the Package that contains the namespace declaration. No subfolder is created.
• If the Package mapping is Folder and the «VB Unit» stereotype is not applied, ACS generates a subfolder for the Package.
• If the Package mapping is Folder and the «VB Unit» stereotype is applied, ACS generates a subfolder for the Package that contains a Visual Basic unit file for the Package.
ACS generates the child items, properties and tagged values of a Package as follows.
Child items:
• If the Package owns Packages, ACS generates a subfolder, namespace and/or Visual Basic unit file for each Package.
All other Package scoped items are ignored.
Properties:
• Mapping property - when set to Namespace, ACS generates the Package as a namespace. If the Mapping property of a Package is set to Folder, ACS generates the Package as a subfolder.
• Name property - ACS generates this property as the name of the subfolder, namespace and/or Visual Basic unit file as appropriate.
| • If a value is set for the VB UnitLocation tag definition, ACS does not use the Name of the Package to name a generated Visual Basic unit file. |
• Visibility property - this property is ignored.
Tag Definitions:
When the «VB Unit» stereotype is applied to a Package, ACS generates the package in its own file. The «VB Unit» stereotype applies the following Tag Definitions to a Package:
• VB UnitLocation tag definition - if a value is set, ACS uses the value to determine the name of the generated Visual Basic unit file and the folder in which that unit file is generated. For example:
◦ A value of MyFile results in ACS generating a file named MyFile.vb in the target folder.
◦ A value of MySubfolder\MyFile results in ACS generating a file named MyFile.vb in a folder named MySubfolder, which ACS creates as a subfolder of the ACS target folder.
• VB Imports tag definition - if a value is set, ACS generates that value as import clauses in the Visual Basic unit file.
If reverse engineering is enabled in ACS, you can change the import clauses in the code file and ACS will update the VB Imports property in the model.