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