/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. */ package org.thingml.xtext.web; import com.google.inject.Binder; import com.google.inject.Provider; import com.google.inject.name.Names; import java.util.concurrent.ExecutorService; import org.eclipse.xtext.ide.LexerIdeBindings; import org.eclipse.xtext.ide.editor.contentassist.FQNPrefixMatcher; import org.eclipse.xtext.ide.editor.contentassist.IPrefixMatcher; import org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper; import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper; import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser; import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer; import org.eclipse.xtext.web.server.DefaultWebModule; import org.thingml.xtext.ide.contentassist.antlr.ThingMLParser; import org.thingml.xtext.ide.contentassist.antlr.internal.InternalThingMLLexer; /** * Manual modifications go to {@link ThingMLWebModule}. */ @SuppressWarnings("all") public abstract class AbstractThingMLWebModule extends DefaultWebModule { public AbstractThingMLWebModule(Provider<ExecutorService> executorServiceProvider) { super(executorServiceProvider); } // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() { return AntlrProposalConflictHelper.class; } // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 public void configureContentAssistLexer(Binder binder) { binder.bind(Lexer.class) .annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST)) .to(InternalThingMLLexer.class); } // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 public Class<? extends IContentAssistParser> bindIContentAssistParser() { return ThingMLParser.class; } // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 public Class<? extends IPrefixMatcher> bindIPrefixMatcher() { return FQNPrefixMatcher.class; } }