{
Vector<UsageMapping> usageMappings = new Vector<UsageMapping>();
for (UsageInfo2UsageAdapter functionUsage : functionUsages)
{
UsageMapping usageMapping = new UsageMapping(functionUsage);
//move "up" from function: mediatorMap.mapView -> mediatorMap.mapView(View, Mediator)
PsiElement context = functionUsage.getElement().getContext();
if (context != null)
{
//move "right" to args: mediatorMap.mapView(View, Mediator) -> (View, Mediator)
PsiElement[] children = context.getChildren()[1].getChildren();
for (PsiElement child : children)
{
usageMapping.add(ResolveUtils.resolveElement(child));
}
usageMappings.add(usageMapping);
}