Configuring a project used in a user-defined pattern
Configure a project that is included in a user-defined pattern to control whether the project is overwritten when a pattern user regenerates a pattern, and to set the name of the project.
Before you begin
About this task
When a pattern user generates a user-defined pattern, copies of projects that are selected as source files in the pattern authoring project are created in the pattern instance. By default, if a pattern user customizes the projects in an instance of a user-defined pattern and then regenerates the pattern instance, those customizations are overwritten. As a pattern author, you can configure projects in a user-defined pattern project so that they are not regenerated when a pattern user regenerates a pattern instance. Pattern users can then customize these projects and regenerate pattern instances without losing the customizations. Projects that are configured so they are not overwritten are also not overwritten if a new version of the pattern is installed before the pattern user regenerates a pattern instance.
As a pattern author, you can specify how a project that is contained in a user-defined pattern is named when a pattern instance is generated. By default, the pattern instance name is added as a prefix to the project name. You can turn off this prefix. If you generate more than one instance of a user-defined pattern that contains a project name without a prefix, all instances of the pattern use the same copy of the project.
As a pattern author, you can name a project in a user-defined pattern by using the value of a pattern parameter. The project name is determined after all transformation expressions are calculated.
To configure a project used in a user-defined pattern:
- In the Pattern Authoring editor, in the Select
Source Files section, select the project you want to configure
and click Edit, or double-click the project
you want to configure. The Edit Project window opens.
- To configure a project so that when a pattern user regenerates
a pattern instance it is not overwritten, select Pattern
users will modify this project. If the project does not exist, it is generated when a pattern user generates an instance of the pattern. If the project exists it is not overwritten. If the project exists, but files within it have been deleted, these files are created.
- To configure a project so that when a pattern user generates a pattern instance the project name does not start with the name of the pattern instance, clear Prefix the project name with the pattern instance name.
- To configure a project so that when a pattern user generates a pattern instance the project name is set to the value of a pattern parameter, click Select. In the Select Pattern Parameter window, select the parameter you want to use to set the project name, then click OK.
- Click OK.