docs: @SuppressWarnings("checkstyle:cyclomaticcomplexity")
  	protected void _createNode(DocumentRootNode parentNode, XtendTypeDeclaration modelElement) {
  		//
  		// The text region is set to the model element, not to the model element's name as in the
  		// default implementation of createStructuralFeatureNode().
  		// The text region computation is overridden in order to have a correct link to the editor.
  		//
  		final boolean isFeatureSet = modelElement.eIsSet(XtendPackage.Literals.XTEND_TYPE_DECLARATION__NAME);
  		final EStructuralFeatureNode elementNode = new EStructuralFeatureNode(
  				modelElement,
  				XtendPackage.Literals.XTEND_TYPE_DECLARATION__NAME,
  				parentNode,
  				this.imageDispatcher.invoke(modelElement),
  				this.textDispatcher.invoke(modelElement),
  				modelElement.getMembers().isEmpty() || !isFeatureSet);
  		final EObject primarySourceElement = this.associations.getPrimarySourceElement(modelElement);
  		final ICompositeNode parserNode = NodeModelUtils.getNode(
  				(primarySourceElement == null) ? modelElement : primarySourceElement);
  		elementNode.setTextRegion(parserNode.getTextRegion());
  		//
  		boolean hasConstructor = false;
  		if (!modelElement.getMembers().isEmpty()) {
  			EObjectNode capacityUseNode = null;
  			EObjectNode capacityRequirementNode = null;
  
  			for (final EObject feature : modelElement.getMembers()) {
  				if (feature instanceof SarlConstructor) {
  					hasConstructor = true;
  					createNode(elementNode, feature);
  				} else if (feature instanceof SarlField) {
  					final SarlField field = (SarlField) feature;
  					createNode(elementNode, field);
  					createAutomaticAccessors(elementNode, field);
  				} else if (feature instanceof SarlAction
  						|| feature instanceof SarlBehaviorUnit
  						|| feature instanceof XtendTypeDeclaration) {
  					createNode(elementNode, feature);
  				} else if (feature instanceof SarlCapacityUses) {
  					capacityUseNode = createCapacityUseNode(elementNode, (SarlCapacityUses) feature, capacityUseNode);
  				} else if (feature instanceof SarlRequiredCapacity) {
  					capacityRequirementNode = createRequiredCapacityNode(elementNode,
  							(SarlRequiredCapacity) feature, capacityRequirementNode);
  				}
  			}
  		}
  		if (!hasConstructor && modelElement instanceof XtendClass) {
  			createInheritedConstructors(elementNode, (XtendClass) modelElement);
  		}
  	}