Class 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 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