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

## Class AdapterUtil

- java.lang.Object
- - org.eclipse.viatra.query.runtime.ui.modelconnector.AdapterUtil

-     public class AdapterUtil
      extends java.lang.Object

  A simple util class for the adapter calls. Returns typesafe objects and checks for errors as well. It will load the required adapters, if they're not present in the system (due to lazy loading of plugins).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AdapterUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IModelConnector` | `getModelConnectorFromIEditorPart(org.eclipse.ui.IEditorPart editorPart)`
    `static java.util.Optional<IModelConnector>` | `getModelConnectorFromIEditorPartChecked(org.eclipse.ui.IEditorPart editorPart)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AdapterUtil

          public AdapterUtil()

  - ### Method Detail

    - #### getModelConnectorFromIEditorPart

          public static IModelConnector getModelConnectorFromIEditorPart(org.eclipse.ui.IEditorPart editorPart)

      Parameters:
        `editorPart` - which can be loaded into the system
      Returns:
        a `ResourceSet` instance which is used by the given editorpart, or null if no such connector is available

    - #### getModelConnectorFromIEditorPartChecked

          public static java.util.Optional<IModelConnector> getModelConnectorFromIEditorPartChecked(org.eclipse.ui.IEditorPart editorPart)

      Parameters:
        `editorPart` - which can be loaded into the system
      Returns:
        a `ResourceSet` instance which is used by the given editorpart
      Since:
        2.1