use of org.yakindu.base.gmf.runtime.highlighting.HighlightingSupportAdapter in project statecharts by Yakindu.
the class IHighlightingSupportAdapterFactory method getAdapter.
@SuppressWarnings("unchecked")
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adapterType == IHighlightingSupport.class) {
if (adaptableObject instanceof DiagramDocumentEditor) {
IHighlightingSupport supportFromCache = cache.get((DiagramDocumentEditor) adaptableObject);
if (supportFromCache != null)
return supportFromCache;
supportFromCache = new HighlightingSupportAdapter((DiagramDocumentEditor) adaptableObject);
cache.put((DiagramDocumentEditor) adaptableObject, supportFromCache);
return supportFromCache;
}
}
return null;
}
Aggregations