Modeler: 14/RefactorTypes
Refactoring Operations
CaseTalk provides refactoring operations to modify and restructure existing model elements. These are available from the Refactor menu or from context menus in diagrams and lists.
Some refactoring features may require advanced settings to be activated through the Environment Options.
Add Role
Adds a new role to an existing fact type, object type, concept, or container.
- Select a type in a diagram or repository list
- Choose Refactor → Add Role
- A list dialog shows compatible types to connect to
- For concepts and containers you can select multiple targets at once
- For binary facts between concepts a role direction dialog appears
Which types can connect to what:
| Selected type | Can connect to |
|---|---|
| Container or Concept | Any other type |
| Fact Type or Object Type | Object types and label types |
| Structure (BTx) | Object types, fact types, and label types |
Changed Role "Played By"
Changes which object type plays a specific role, without deleting and recreating the role.
- Select a role in the Role Editor or Role Table Editor
- Choose Refactor → Change Played By
- Pick the new target object type from the list
Existing constraints and population data associated with the role are preserved.
Nominalize Label Type
Converts a label type into an object type (nominalization). This is a common modeling refinement when a value type needs to participate in additional fact types.
- Select a label type in a diagram or list
- Choose Refactor → Nominalize
- The label type is transformed into an object type; existing roles are preserved
Replace Object Type
Replaces one object type with another across the entire model. All roles, expressions, and constraints referencing the original type are redirected to the replacement.
- Select the object type to replace
- Choose Refactor → Replace
- Select the replacement object type
This is useful for merging duplicate types or correcting modeling errors.
Replace Object Type Expression
Separates a specific expression from a fact type into a new, independent fact type. The original expression can optionally be removed.
- Select an expression in the Repository
- Choose Refactor → Separate Expression
- The expression (with its roles and constraints) is copied into a new type
Duplicate
Creates an exact copy of one or more types, including all roles, expressions, and constraints.
- Select one or more types
- Choose Refactor → Duplicate
- Enter a new name (for single items) or confirm the name mapping (for batch operations)
Duplicate Onto
A variant of Duplicate that copies types from one repository file onto another. This lets you use one model as a template for another, with an optional name translation map.
- Open both the source and target repository files in the Project Manager
- Select the types to copy
- Choose Refactor → Duplicate Onto
- Select the target repository and confirm the name mapping
Split Fact Type
Splits a multi-role fact type into smaller fact types. This is useful when a fact type has been over-generalized and needs to be decomposed.
- Select the fact type to split
- Choose Refactor → Split
- Configure how roles should be distributed across the new fact types
| Diagrams | |
|---|---|
| Dialogs | Diagram Designer · Diagram Options · OFType Editor · OFType Filter · OFType Table Editor · Fact Documentation |
| Reference | Other Diagrams · UML Methods |