Controllers
Controller as in
MVC in our case consists of two parts. Controllers and
Commands. Controllers also consist of two parts, ElementControllers and CommandControllers.
Element Controllers
Classes providing methods for changing the model (or
ViewHelpers) using
Commands, each PIM and PSM element has its own controller providing means to rename, add/remove attributes, operations etc. Used mainly by view elements, so they do not create Commands on their own.
Example
PSMClassController Controls PSMClass Model element, is used by PSMClass View element. Provides methods such as DeriveNewRootPSMClass, AddClassSpecialization, GroupBy, AddChildren, ManageAttributes etc., which are usually wrappers for
Commands creation.
CommandControllers
Diagram Controller
There is one for each diagram, stores diagram-specific settings like Diagram (model class representing a Diagram), and provides diagram-specific methods like NewAssociation, NewGeneralization etc., which are usually also wrappers for
Commands creation and initialization.
Model Controller
One per project (we support only one project so far), stores the undo stack and the redo stack, provides model-specific methods like IsElementUsedInDiagrams, HasElementPSMDependencies, CreateSimpleType etc.
View Controller
Provides methods for moving and resizing view elements, which are usually also wrappers for
Commands like MoveElement, ResizeElement, BreakLine etc.
Controllers inheritance diagram
