RAD Studio (Common)
ContentsIndex
PreviousUpNext
Together Pattern Procedures

This section provides how-to information on using patterns with Together.

Name 
Description 
Patterns as First Class Citizens are represented by the GoF patterns. When such patterns are applied, the elements are created with the standard number of participants. However, you can add allowed participants to the existing pattern object. If you add participants, links between the pattern object and the new participants are created. 
You can use existing diagram elements as the basis to create custom patterns. The newly created patterns are stored in the Pattern Registry. They become visible in the pattern tree of the Pattern Organizer and can be used to generate design elements in diagrams. 
You can delete elements of the patterns as First Class Citizens (GoF patterns), using both the Diagram View and the Model View. If you delete elements, they are removed from the diagram and from the model. 
The Pattern Registry is only available from the Pattern Organizer context menu, when you create a new shortcut, or assign a pattern to a shortcut. In the Pattern Registry you can filter patterns by category, metaclass, diagram type, language or status of registration.
To open the Pattern Registry, do one of the following:
  • Right-click a folder and choose New shortcut.
  • Right-click a pattern shortcut and choose Assign Pattern.
 
Together makes it easy for you to apply patterns when creating links. To create links during modeling, you can use the Link by Pattern button in the diagram Tool Palette. The Link by Pattern button launches the Pattern Wizard dialog displaying the available patterns. 
You can apply patterns explicitly using the Node by Pattern button in the Tool Palette or by using the right-click menu command Create by Pattern. Whenever you create an element on a diagram using one of the toolbar buttons, you are applying a default pattern that is connected to the selected button. 
 
You can create patterns and export them to the specified location. 
You can reuse patterns created in the different versions of Together. Upon starting Together, the available storage is scanned for patterns, and all the encountered patterns are included in the Pattern Registry. However, they are not available for usage unless you manually create shortcuts to these patterns in the Pattern Organizer
You can store patterns in the shared locations, to facilitate team development. The Pattern Organizer enables access to the shared patterns if the paths to these patterns are included in the list of Shared Pattern Roots. being included in the list, patterns from the shared location become visible in the Custom Patterns node of the patterns tree. 
You can associate a pattern with one or more shortcuts, located in the various virtual folders. 
 
Use virtual folders to logically organize patterns in the pattern trees. 
In the Pattern Organizer you are working with shortcuts, not with the actual patterns. Because of this, shortcuts to the same pattern may be included in several folders. 
The Pattern Organizer enables you to logically organize patterns using virtual trees, folders and shortcuts. Under a tree node you can create virtual folders and shortcuts to patterns. 
 
Properties of the virtual trees, folders and shortcuts are displayed in the properties section of the Pattern Organizer. Using the toolbar buttons, you can choose the properties presentation: in expandable nodes, or in alphabetical order. The Name and Visible properties are editable. Changes are applied when the edited field looses the focus, or the Enter key is pressed. The node name in the tree view changes accordingly. 
The Pattern Organizer enables you to logically organize patterns (using virtual trees, folders and shortcuts), and view and edit the pattern properties. 
If you have changed the contents of the Pattern Registry using the Pattern Organizer (created new shortcuts, exported or created shared folders), these changes are synchronized with the Registry automatically. When you close the Pattern Organizer, you are prompted to save changes. Each time you start Together, the contents of the available storage is scanned for patterns. The contents of the registry is synchronized with the actual availability of the pattern folders. If you have made changes to the patterns outside the Organizer, these changes will be synchronized when Together is started. 
While working with the Pattern Organizer, the logical trees, folders, and shortcuts may be displayed in an arbitrary order. You can sort nodes alphabetically within the container node, using the Sort Folder command. 
The Pattern Organizer enables you to:
  • Create logical pattern trees and folders
  • Create shortcuts to patterns
  • Assign patterns to shortcuts
  • Copy, paste and delete trees, folders and shortcuts
  • Save changes in the Pattern Registry
 
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!