diff options
Diffstat (limited to 'plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/AlfRuntimeModule.java')
-rw-r--r-- | plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/AlfRuntimeModule.java | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/AlfRuntimeModule.java b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/AlfRuntimeModule.java index ee63794b244..a4f57c1d7b3 100644 --- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/AlfRuntimeModule.java +++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/AlfRuntimeModule.java @@ -1,22 +1,52 @@ /***************************************************************************** - * Copyright (c) 2011 CEA LIST. - * + * Copyright (c) 2014 CEA LIST. * + * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * CEA LIST - Initial API and implementation - * + * Ed Seidewitz (MDS) - Initial implementation + * Jérémie Tatibouet + * Arnaud Cuccuru + * *****************************************************************************/ package org.eclipse.papyrus.uml.alf; +import org.eclipse.xtext.parser.IParser; + +import org.eclipse.emf.ecore.util.Diagnostician; +import org.eclipse.xtext.service.SingletonBinding; + +import com.google.inject.Binder; +import com.google.inject.name.Names; + /** * Use this class to register components to be used at runtime / without the Equinox extension registry. */ public class AlfRuntimeModule extends org.eclipse.papyrus.uml.alf.AbstractAlfRuntimeModule { -} + /** + * Returns a parser which takes advantage of entry rules changes + */ + @Override + public Class<? extends IParser> bindIParser() { + return org.eclipse.papyrus.uml.alf.parser.antlr.MutableAlfParser.class; + } + @SingletonBinding + @Override + public Class<? extends Diagnostician> bindDiagnostician() { + return CachingDiagnostician.class; + } + + @Override + public void configure(Binder binder) { + super.configure(binder); + binder.bindConstant().annotatedWith(Names.named( + org.eclipse.xtext.validation.CompositeEValidator.USE_EOBJECT_VALIDATOR)). + to(false); + } +} |