code: protected EObject getContainerInRule(EObject root, EObject content) {
  		EObject container = content;
  		do {
  			final EClassifier classifier = getGeneratedTypeFor(container);
  			if (classifier != null) {
  				return container;
  			}
  			container = container.eContainer();
  		} while (container != root);
  		final EClassifier classifier = getGeneratedTypeFor(root);
  		if (classifier != null) {
  			return root;
  		}
  		return null;
  	}
docs: Replies the container in the grammar rule for the given content element.
  
  @param root the biggest enclosing element to consider in the grammar.
  @param content the grammar element to search for the container.
  @return the container of the content.