use of org.eclipse.xtend.ide.common.outline.IXtendOutlineContext in project xtext-xtend by eclipse.
the class XtendOutlineSourceTreeBuilder method buildDispatchers.
protected void buildDispatchers(final JvmDeclaredType inferredType, final JvmDeclaredType baseType, final IXtendOutlineContext context) {
final Function1<JvmOperation, Boolean> _function = (JvmOperation it) -> {
return Boolean.valueOf(this.dispatchHelper.isDispatcherFunction(it));
};
Iterable<JvmOperation> _filter = IterableExtensions.<JvmOperation>filter(inferredType.getDeclaredOperations(), _function);
for (final JvmOperation dispatcher : _filter) {
{
final List<JvmOperation> dispatchCases = this.getDispatchCases(dispatcher, baseType, context);
final IXtendOutlineContext dispatcherContext = this.xtendOutlineNodeBuilder.buildDispatcherNode(baseType, dispatcher, dispatchCases, context).markAsProcessed(dispatcher);
for (final JvmOperation dispatchCase : dispatchCases) {
EObject _elvis = null;
XtendFunction _xtendFunction = this._iXtendJvmAssociations.getXtendFunction(dispatchCase);
if (_xtendFunction != null) {
_elvis = _xtendFunction;
} else {
_elvis = dispatchCase;
}
this.buildFeature(baseType, dispatchCase, _elvis, dispatcherContext).markAsProcessed(dispatchCase);
}
}
}
}
Aggregations