Package org.eclipse.handly.model.adapter
Class DefaultContentAdapter
java.lang.Object
org.eclipse.handly.model.adapter.DefaultContentAdapter
- All Implemented Interfaces:
IContentAdapter
A content adapter that is based on
IAdaptable
mechanism.
For a given IElement
the corresponding element is obtained from the
ICorrespondingElementProvider
the IElement
adapts to.-
Field Summary
Modifier and TypeFieldDescriptionstatic final IContentAdapter
The sole instance of the default content adapter. -
Method Summary
-
Field Details
-
INSTANCE
The sole instance of the default content adapter.
-
-
Method Details
-
adapt
Description copied from interface:IContentAdapter
Returns theIElement
that corresponds to the given element.- Specified by:
adapt
in interfaceIContentAdapter
- Parameters:
element
- may benull
- Returns:
- the corresponding
IElement
, ornull
if none
-
getCorrespondingElement
Description copied from interface:IContentAdapter
Returns the element that corresponds to the givenIElement
.- Specified by:
getCorrespondingElement
in interfaceIContentAdapter
- Parameters:
element
- anIElement
(may benull
)- Returns:
- the corresponding element, or
null
if none
-