code: protected static XMemberFeatureCall getRootOfMemberFeatureCallSequence(EObject leaf, EObject container,
  			Procedure1<XMemberFeatureCall> feedback) {
  		EObject call = leaf;
  		EObject obj = EcoreUtil2.getContainerOfType(leaf.eContainer(), XExpression.class);
  		while (obj != null && (container == null || obj != container)) {
  			if (!(obj instanceof XMemberFeatureCall)) {
  				obj = null;
  			} else {
  				final EObject previous = call;
  				final XMemberFeatureCall fcall = (XMemberFeatureCall) obj;
  				call = fcall;
  				if (fcall.getActualReceiver() == previous) {
  					// Sequence of calls, with the '.' char.
  					if (feedback != null) {
  						feedback.apply(fcall);
  					}
  					obj = EcoreUtil2.getContainerOfType(call.eContainer(), XExpression.class);
  				} else if (fcall.getActualArguments().contains(previous)) {
  					// The sequence is an argument of a function call.
  					call = previous;
  					obj = null;
  				} else {
  					obj = null;
  				}
  			}
  		}
  		return call instanceof XMemberFeatureCall ? (XMemberFeatureCall) call : null;
  	}
docs: Replies the member feature call that is the root of a sequence of member feature calls.
  
  <p>While the current feature call is the actual receiver of a member feature call, and not an argument,
  the sequence is still active. Otherwise, the sequence is stopped.
  
  @param leaf the expression at the leaf of the feature call.
  @param container the top most container that cannot be part of the sequence. Could be {@code null}.
  @param feedback the function that is invoked on each discovered member feature call within the sequence. Could be {@code null}.
  @return the root of a member feature call sequence.