                                 Patterns HOWTO

   Abstract

   The purpose of this document is to give you a walk-through of patterns
   support in Together.

     ----------------------------------------------------------------------

   Table of Contents

         Generation
                Apply Pattern Wizard
                Save As Pattern Wizard

         Recognition
                Patterns Recognizer

     ----------------------------------------------------------------------

Generation

   There is one common mechanism for patterns generation, the Apply Pattern
   dialog.

  Apply Pattern Wizard

   There are several ways you can invoke the Apply Pattern Wizard:
   
   o On the class/package diagram use the Class by and Link by pattern 
   elements from the toolbar and click on the diagram, or
   
   o Right click on an existing class and select Apply Pattern
   
   You can select a pattern from the tree on the left side, customize 
   its parameters, and then click Finish to generate the pattern.
   
     o Apply Singleton pattern

       Select a Java element and invoke the Apply Pattern wizard. Then select
       GoF Patterns/Creational/Singleton, customize the parameters, and click
       Finish.

  Save As Pattern Wizard

   To invoke the Save as Pattern wizard, open a package diagram with classes on
   and right-click on an existing class. Then select the Save as Pattern... 
   entry from the context menu.  This creates the template and opens it in
   the template editor ready for you to add more functionality to it.

Recognition

   Patterns are recognized directly from existing source code elements during
   a build process. To customize patterns recognition for a particular
   project, right-click the project in Packages view. Then select Properties
   from the context menu. In the properties dialog select the Patterns
   category.

  Patterns Recognizer

   The Patterns Recognizer is part of the Together Modeling Perspective.

   The Patterns Recognizer allows you to browse the recognized patterns,
   including the pattern participants. You can also invoke pattern specific
   actions using the context menu.

     o Add Product to AbstractFactory

       Generate AbstractFactory pattern using the generation mechanism
       described above. Then open the Patterns Recognizer view, right-click 
       on the project where you created the pattern, and invoke Rebuild Patterns
       action.

	   Navigate down the projects tree until you locate the AbstractFactory pattern.
       Expand the AbstractFactory node, right-click on the pattern node,and select
       the Product... action.
