Skip to content

Latest commit

 

History

History
107 lines (61 loc) · 6.15 KB

File metadata and controls

107 lines (61 loc) · 6.15 KB
graph LR
    gaphor_storage_load["gaphor.storage.load"]
    gaphor_storage_save["gaphor.storage.save"]
    gaphor_storage_recovery_Recovery["gaphor.storage.recovery.Recovery"]
    gaphor_services_undomanager_UndoManager["gaphor.services.undomanager.UndoManager"]
    gaphor_core_eventmanager["gaphor.core.eventmanager"]
    gaphor_transaction_Transaction["gaphor.transaction.Transaction"]
    gaphor_core_modeling_elementfactory["gaphor.core.modeling.elementfactory"]
    gaphor_storage_xmlwriter["gaphor.storage.xmlwriter"]
    gaphor_storage_load -- "uses" --> gaphor_core_modeling_elementfactory
    gaphor_storage_load -- "is counterpart of" --> gaphor_storage_save
    gaphor_storage_save -- "uses" --> gaphor_storage_xmlwriter
    gaphor_storage_save -- "is counterpart of" --> gaphor_storage_load
    gaphor_storage_recovery_Recovery -- "subscribes to events from" --> gaphor_core_eventmanager
    gaphor_storage_recovery_Recovery -- "monitors" --> gaphor_transaction_Transaction
    gaphor_services_undomanager_UndoManager -- "subscribes to events from" --> gaphor_core_eventmanager
    gaphor_services_undomanager_UndoManager -- "observes transaction events from" --> gaphor_transaction_Transaction
    gaphor_core_eventmanager -- "notifies" --> gaphor_storage_recovery_Recovery
    gaphor_core_eventmanager -- "notifies" --> gaphor_services_undomanager_UndoManager
    gaphor_transaction_Transaction -- "provides context to" --> gaphor_storage_recovery_Recovery
    gaphor_transaction_Transaction -- "provides context to" --> gaphor_services_undomanager_UndoManager
    gaphor_core_modeling_elementfactory -- "is used by" --> gaphor_storage_load
    gaphor_storage_xmlwriter -- "is used by" --> gaphor_storage_save
Loading

CodeBoardingDemoContact

Details

The Gaphor application's core functionality revolves around robust model management, encompassing loading, saving, recovery, and undo/redo capabilities. The gaphor.core.eventmanager acts as a central nervous system, coordinating interactions between components by dispatching events. Model persistence is handled by gaphor.storage.load and gaphor.storage.save, which rely on gaphor.core.modeling.elementfactory for object instantiation and gaphor.storage.xmlwriter for XML serialization. Data integrity and user experience are enhanced by gaphor.storage.recovery.Recovery and gaphor.services.undomanager.UndoManager, both of which observe and react to the atomic changes managed by gaphor.transaction.Transaction. This design ensures a consistent and recoverable state for the user's modeling work.

gaphor.storage.load

Responsible for deserializing Gaphor models from persistent storage (e.g., XML files) into in-memory objects. It reconstructs model elements and their relationships, handling version compatibility.

Related Classes/Methods:

gaphor.storage.save

Manages the serialization of the current in-memory Gaphor model into a persistent format (e.g., XML) for storage. It iterates through model elements and their properties to create a complete representation.

Related Classes/Methods:

gaphor.storage.recovery.Recovery

Ensures data integrity by logging model changes (events) to facilitate recovery from unexpected application shutdowns. It can replay these events to restore a model to its last consistent state.

Related Classes/Methods:

gaphor.services.undomanager.UndoManager

Provides undo and redo capabilities by tracking and managing a stack of reversible model operations. It groups individual model changes into logical transactions.

Related Classes/Methods:

gaphor.core.eventmanager

A central event bus that manages and dispatches events throughout the application, notifying subscribed components of model changes and transaction states.

Related Classes/Methods:

gaphor.transaction.Transaction

Manages atomic model changes and the lifecycle of transactions, ensuring data consistency by grouping multiple operations into a single, reversible unit.

Related Classes/Methods:

gaphor.core.modeling.elementfactory

Responsible for instantiating and managing Gaphor model elements, particularly during the loading process and other model creation operations.

Related Classes/Methods:

gaphor.storage.xmlwriter

Handles the low-level serialization of Gaphor model data into XML format, used by the save component to write models to persistent storage.

Related Classes/Methods: