Changes

Heiko Klare edited this page Mar 27, 2018 · 3 revisions

Table of Contents

Change Descriptions Metamodel

We provide a metamodel for change descriptions. It provides metaclasses for all changes that can be performed in Ecore-based metamodels. The metamodel focusses on atomic changes (those that can be expressed by the modification of a single model value) and also provides some compound changes that are of common interest

Atomic Changes

  1. Existence Changes
    • Creation of an EObject
    • Deletion of an EObject
  2. Attribute Changes
    • Single-valued EAttributes
      • Replacement of attribute value
    • Multi-valued EAttributes
      • Insertion of an EAttributeValue
      • Removal of an EAttributeValue
  3. Reference Changes
    • Single-valued EReferences value
      • Replacement of an EReference value
    • Multi-valued EReferences
      • Insertion of an EReference value
      • Removal of an EReference value

Compound Changes

There are some compound changes that are essential as they provide further information about an Ecore change operation

  1. Unset Changes
    • Unsetting an EAttribute
      • Removes the value of the EAttribute or all values if it is multi-valued and sets an unset flag if the EAttribute is unsettable
      • Contains a list of EAttribute removal changes
    • Unsetting an EReference
      • Removes the value of the EReference or all values if it is multi-valued and sets an unset flag if the EReference is unsettable
      • Contains a list of arbitrary changes, as the removal of all references of an EReference can result in a cascade of arbitrary changes as the subtrees of contained elements are removed
  2. Move Changes
    • Moving an element from one EReference to another
    • Contains the EReference removal of the original container and the EReference insertion of the new container
    • There are no existence changes involved
    • Even on single-valued EReferences, the movement is only a removal or insertion, no replacement with another value
Some compound changes group changes that semantically belong together
  1. Create and insert EReference
    • Creation of an EObject and insertion into a multi-valued EReference
  2. Remove and delete EReference
    • Removal of an EReference from a multi-valued EReference and deletion of that EObject
  3. Create and replace and delete EReference
    • Creation of an EObject, replacement of a single-valued EReference with that value and deletion of the old EObject

The Vitruvius Change

The EChange is the most generic change type of the change descriptions metamodel. It is extended by all other change types. The Vitruvius Change is a base interface for all kinds of changes in Vitruvius, especially also sequences of changes, transactions and so on, and consists of EChanges that describe that change. Next, we give a short overview about all changes types are processed within the Vitruvius framework.

  • VitruviusChange: A vitruvius change is a base interface for all kinds of changes in Vitruvius.
  • AtomicChange: An atomic change is the smallest possible modification in a model (e.g., changing a property value). Such changes cannot be subdivided into two changes as they just affect a single value of a model.
  • CompositeChange: A composite change is composed of atomic changes.
  • TransactionalChange: A transactional change defines one or more VitruviusChanges, which have to be performed together. They were recorded together and have to be propagated to models completely or not at all.
  • CompositeTransactionalChange: A composite transactional change defines a set of TransactionalChanges.
  • ConcreteChange: A concrete change represents a particular EChange.
  • Original Change: An original change is performed by a user. It may trigger a consequential change due to consistency preservation.
  • ConsequentialChange: A consequential change is triggered through consistency preservation based on an original change.
  • PropagatedChange: A propagated change contains an original and consequential changes.

Change Visualization

Vitruv provides an extension to visualize changes, both the originally performed ones and those performed by consistency preservation, in a table view. The extension can be installed from the updatesite or imported as an extension plugin from the main repository.

The plugin is used to view, store, load and search propagation results of VirtualModels. It is implemented in a separate frame using a tree. It can be started from within Eclipse and as an offline application with no dependency to Eclipse or Vitruv. The offline application is not able to receive new change propagations, its single purpose is to load and visuale saved change propagations. For further information about the plugin and its code, see the javadoc and comments there.

It is possible to toggle change visualization for a virtual model by right-clicking on the virtual model's project in the Eclipse package explorer, project explorer or sirius model explorer. Once activated, all changes are recorded and visualized in separate tabs of the ui if more than one virtual model is observed.

It is also possible to use the plugin in headless mode with no immediate visualization and store the results in a file for later usage. This can be accomplished by adding the plugin's PropagatedChangeListener to a virtual model and calling ChangeVisualization.saveToFile(File) after all changes have been recorded. The listener is accessible through ChangeVisualization.getPropagatedChangeListener() and can be added to the virtual model via addPropagatedChangeListener(PropagatedChangeListener).

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.