Enabling Pattern Recognition

Together can detect patterns in your projects when you enable the pattern recognition feature. By default, the patterns recognizer is not selected in the Together preferences. Even with pattern recognition disabled, however, Together can generate a list of patterns in your project.

You can set pattern recognition to run automatically when all projects, or only specific projects, are built/rebuilt.

NB: Currently, except for Singleton and Proxy patterns, the Patterns Recognizer view displays Gang of Four patterns in your project only if you created them using the Patterns wizard.

Setting Pattern Recognition

You can set pattern recognition at either the project or global level:

Project Level

To run pattern recognition for a specific project during the build process:

  1. Open the UML Explorer or the Navigator view (Window > Show View > Navigator).

  2. Right click on the Project.

  3. Select Properties.


  4. Select Patterns from the treeview.


  5. On the right side of the page, select the General tab.

  6. Check Recognize patterns when building project.

Global Level

To run pattern recognition for any project during the build process:

  1. From the menubar, select Window > Preferences.


  2. In the options list on the left, expand the Modeling node, and select Patterns.


  3. On the right side of the page, select the General tab.

  4. Check Recognize patterns when building project.


NB:
To run the patterns recognizer manually:

  1. In the Patterns Recognizer view, right click on your project. 

  2. Select Rebuild Patterns.

    Recognized patterns appear as new nodes under the project.


Related Topic:

Patterns Preferences