/*
 * generated by Xtext 2.12.0
 */
package com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr;

import com.google.inject.Inject;
import com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr.internal.InternalMappingParser;
import com.irtsaintexupery.xtext.pseim.services.MappingGrammarAccess;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser;

public class MappingParser extends AbstractContentAssistParser {

	@Inject
	private MappingGrammarAccess grammarAccess;

	private Map<AbstractElement, String> nameMappings;

	@Override
	protected InternalMappingParser createParser() {
		InternalMappingParser result = new InternalMappingParser(null);
		result.setGrammarAccess(grammarAccess);
		return result;
	}

	@Override
	protected String getRuleName(AbstractElement element) {
		if (nameMappings == null) {
			nameMappings = new HashMap<AbstractElement, String>() {
				private static final long serialVersionUID = 1L;
				{
					put(grammarAccess.getPatternApplicationAccess().getGroup(), "rule__PatternApplication__Group__0");
					put(grammarAccess.getPatternApplicationAccess().getGroup_5(), "rule__PatternApplication__Group_5__0");
					put(grammarAccess.getPatternApplicationAccess().getGroup_6(), "rule__PatternApplication__Group_6__0");
					put(grammarAccess.getPatternApplicationAccess().getGroup_7(), "rule__PatternApplication__Group_7__0");
					put(grammarAccess.getCardinalityValueAccess().getGroup(), "rule__CardinalityValue__Group__0");
					put(grammarAccess.getPortMappingAccess().getGroup(), "rule__PortMapping__Group__0");
					put(grammarAccess.getPortMappingAccess().getGroup_1(), "rule__PortMapping__Group_1__0");
					put(grammarAccess.getGraphElementMappingAccess().getGroup(), "rule__GraphElementMapping__Group__0");
					put(grammarAccess.getGraphElementMappingAccess().getGroup_1(), "rule__GraphElementMapping__Group_1__0");
					put(grammarAccess.getEIntAccess().getGroup(), "rule__EInt__Group__0");
					put(grammarAccess.getQualifiedIDAccess().getGroup(), "rule__QualifiedID__Group__0");
					put(grammarAccess.getQualifiedIDAccess().getGroup_1(), "rule__QualifiedID__Group_1__0");
					put(grammarAccess.getPatternApplicationAccess().getModelAssignment_1(), "rule__PatternApplication__ModelAssignment_1");
					put(grammarAccess.getPatternApplicationAccess().getPatternAssignment_3(), "rule__PatternApplication__PatternAssignment_3");
					put(grammarAccess.getPatternApplicationAccess().getCardinalityValuesAssignment_5_1(), "rule__PatternApplication__CardinalityValuesAssignment_5_1");
					put(grammarAccess.getPatternApplicationAccess().getCardinalityValuesAssignment_5_2(), "rule__PatternApplication__CardinalityValuesAssignment_5_2");
					put(grammarAccess.getPatternApplicationAccess().getModelElementAssignment_6_1(), "rule__PatternApplication__ModelElementAssignment_6_1");
					put(grammarAccess.getPatternApplicationAccess().getModelElementAssignment_6_2(), "rule__PatternApplication__ModelElementAssignment_6_2");
					put(grammarAccess.getPatternApplicationAccess().getPortMappingAssignment_7_1(), "rule__PatternApplication__PortMappingAssignment_7_1");
					put(grammarAccess.getPatternApplicationAccess().getPortMappingAssignment_7_2(), "rule__PatternApplication__PortMappingAssignment_7_2");
					put(grammarAccess.getCardinalityValueAccess().getCardinalityElementAssignment_0(), "rule__CardinalityValue__CardinalityElementAssignment_0");
					put(grammarAccess.getCardinalityValueAccess().getValueAssignment_2(), "rule__CardinalityValue__ValueAssignment_2");
					put(grammarAccess.getPortMappingAccess().getModelPortAssignment_0(), "rule__PortMapping__ModelPortAssignment_0");
					put(grammarAccess.getPortMappingAccess().getModelPortAssignment_1_1(), "rule__PortMapping__ModelPortAssignment_1_1");
					put(grammarAccess.getPortMappingAccess().getPatternPortAssignment_3(), "rule__PortMapping__PatternPortAssignment_3");
					put(grammarAccess.getGraphElementMappingAccess().getModelGraphElementAssignment_0(), "rule__GraphElementMapping__ModelGraphElementAssignment_0");
					put(grammarAccess.getGraphElementMappingAccess().getModelGraphElementAssignment_1_1(), "rule__GraphElementMapping__ModelGraphElementAssignment_1_1");
					put(grammarAccess.getGraphElementMappingAccess().getPatternGraphElementAssignment_3(), "rule__GraphElementMapping__PatternGraphElementAssignment_3");
				}
			};
		}
		return nameMappings.get(element);
	}
			
	@Override
	protected String[] getInitialHiddenTokens() {
		return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
	}

	public MappingGrammarAccess getGrammarAccess() {
		return this.grammarAccess;
	}

	public void setGrammarAccess(MappingGrammarAccess grammarAccess) {
		this.grammarAccess = grammarAccess;
	}
}
