This lesson guides you through the steps to create a new pattern
using the Pattern Authoring view.
Before you begin, you must have created the patterns project as detailed
in Lesson 1: Create the patterns project.
Patterns are created using the Pattern Authoring view. To organize,
select, and apply patterns, you can use the Pattern Explorer view.
If
you would like to view this lesson before you perform the steps, click:
To create a new pattern:
- In the Package Explorer view, expand your patterns project. The
PatternLibrary class has been added to your patterns project.
If
you do not see your project in the Package Explorer view, return to Lesson
1: Create the patterns project.
- Right-click the pattern library in the Pattern Authoring view and
click New Pattern. The New Pattern window opens.
- Type the name of your new pattern, class, and package, and select
the pattern type.
- Type the new pattern name on the General page,
in the Pattern Name field.
- Type the name of the class on the General page,
in the Class Name field.
- On the General page, in the Package field,
remove the pattern name that was added at the end of the package name.
- From the Pattern Type list, select the
type of pattern (Class, Collaboration,
or Package) you are creating.
- On the General page, in the Target
Types field, select the type for your pattern (Package, Collaboration,
or Class).
- On the General page, in the Groups field,
click Remove to remove the default group name.
- Click Add to add a new group name. The
Add Group window opens. Type the name of your group in the Group field.
- Click the Detail tab to add pattern documentation
and search keywords. The keywords represent the pattern and assist the user
in finding the pattern when searching in a RAS pattern repository.
- Click OK.
The new pattern is displayed in the Pattern Authoring view. A Java
class is added to your new pattern package. The new pattern folder contains
a new UML model for the pattern. The new pattern folder also contains a new
RAS manifest for the pattern.