/*
 * generated by Xtext 2.12.0
 */
package com.irtsaintexupery.xtext.pseim.formatting2

import com.google.inject.Inject
import com.irtsaintexupery.pseim.mapping.CardinalityValue
import com.irtsaintexupery.pseim.mapping.GraphElementMapping
import com.irtsaintexupery.pseim.mapping.PatternApplication
import com.irtsaintexupery.pseim.mapping.PortMapping
import com.irtsaintexupery.xtext.pseim.services.MappingGrammarAccess
import org.eclipse.xtext.formatting2.AbstractFormatter2
import org.eclipse.xtext.formatting2.IFormattableDocument

class MappingFormatter extends AbstractFormatter2 {
	
	@Inject extension MappingGrammarAccess

	def dispatch void format(PatternApplication patternApplication, extension IFormattableDocument document) {
		// TODO: format HiddenRegions around keywords, attributes, cross references, etc. 
		for (CardinalityValue cardinalityValue : patternApplication.getCardinalityValues()) {
			cardinalityValue.format;
		}
		for (PortMapping portMapping : patternApplication.getPortMapping()) {
			portMapping.format;
		}
		for (GraphElementMapping graphElementMapping : patternApplication.getModelElement()) {
			graphElementMapping.format;
		}
	}
	
	// TODO: implement for 
}
