Package org.eclipse.viatra.query.runtime.ui.modelconnector

## Interface IModelConnector

- All Known Implementing Classes:
    `EMFModelConnector`

      public interface IModelConnector

  This interface provides all API calls for a connector that can provide an instance model. Implementations of this interface should contain the editor specific handling of loadModel, unloadModel, getNotifier and showLocation methods.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `org.eclipse.emf.common.notify.Notifier` | `getNotifier​(IModelConnectorTypeEnum modelConnectorTypeEnum)` |
    `org.eclipse.ui.IWorkbenchPart` | `getOwner()` |
    `java.util.Collection<org.eclipse.emf.ecore.EObject>` | `getSelectedEObjects()` | Returns the objects currently selected at the adapted model.
    `void` | `loadModel​(IModelConnectorTypeEnum modelConnectorTypeEnum)` | Loads the instance model into the model connector with the given type.
    `void` | `showLocation​(java.lang.Object[] locationObjects)` |
    `void` | `unloadModel()` | Unloads the instance model from the model connector.

- - ### Method Detail

    - #### loadModel

          void loadModel​(IModelConnectorTypeEnum modelConnectorTypeEnum)

      Loads the instance model into the model connector with the given type.
      Parameters:
        `modelConnectorTypeEnum` - The model type which should be loaded.

    - #### unloadModel

          void unloadModel()

      Unloads the instance model from the model connector.

    - #### getNotifier

          org.eclipse.emf.common.notify.Notifier getNotifier​(IModelConnectorTypeEnum modelConnectorTypeEnum)

      Parameters:
        `modelConnectorTypeEnum` -
      Returns:
        A Notifier implementation for the given IModelConnectorType.

    - #### showLocation

          void showLocation​(java.lang.Object[] locationObjects)

      Parameters:
        `locationObjects` - Shows the location of these objects inside the specific editor.

    - #### getOwner

          org.eclipse.ui.IWorkbenchPart getOwner()

      Returns:
        a workbench part (view, editor) which is the owner of the model adapted by the model connector

    - #### getSelectedEObjects

          java.util.Collection<org.eclipse.emf.ecore.EObject> getSelectedEObjects()

      Returns the objects currently selected at the adapted model. If there are both domain and view model elements in the adapted model, it is expected that the domain model elements are returned.
      Returns:
        a non-null, but possibly empty collection of model objects