blob: aba5f20c4629b3b4e63cd3f0c79597ff9ff6e28d [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* 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:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
package org.eclipse.osbp.xtext.chart;
import javax.inject.Singleton;
import org.eclipse.xtext.conversion.IValueConverterService;
import org.eclipse.xtext.generator.IGenerator;
import org.eclipse.xtext.generator.IOutputConfigurationProvider;
import org.eclipse.xtext.scoping.IScopeProvider;
import org.eclipse.osbp.dsl.xtext.lazyresolver.LazyJvmTypeLinker;
import org.eclipse.osbp.dsl.xtext.lazyresolver.SemanticLoadingResource;
import org.eclipse.osbp.dsl.xtext.lazyresolver.linker.LazyJvmTypeTransientValueService;
import com.google.inject.Binder;
import org.eclipse.osbp.xtext.chart.jvmmodel.ChartModelGenerator;
import org.eclipse.osbp.xtext.chart.scoping.ChartScopeProvider;
import org.eclipse.osbp.xtext.chart.valueconverter.ChartQualifiedNameProvider;
import org.eclipse.osbp.xtext.chart.valueconverter.ChartValueConverterService;
import org.eclipse.osbp.xtext.i18n.DSLOutputConfigurationProvider;
// TODO: Auto-generated Javadoc
/**
* Use this class to register components to be used at runtime / without the Equinox extension registry.
*/
public class ChartDSLRuntimeModule extends org.eclipse.osbp.xtext.chart.AbstractChartDSLRuntimeModule {
/* (non-Javadoc)
* @see org.eclipse.osbp.xtext.chart.AbstractChartDSLRuntimeModule#bindIGenerator()
*/
@Override
public Class<? extends IGenerator> bindIGenerator() {
return ChartModelGenerator.class;
}
/* (non-Javadoc)
* @see org.eclipse.osbp.xtext.chart.AbstractChartDSLRuntimeModule#bindIScopeProvider()
*/
public Class<? extends IScopeProvider> bindIScopeProvider() {
return ChartScopeProvider.class;
}
/**
* Only required, if fqn can not be created by appending the names of the
* semantic elements up the hierarchy.
*
* @return the class<? extends org.eclipse.xtext.naming. I qualified name provider>
*/
public Class<? extends org.eclipse.xtext.naming.IQualifiedNameProvider> bindIQualifiedNameProvider() {
return ChartQualifiedNameProvider.class;
}
/* (non-Javadoc)
* @see org.eclipse.osbp.xtext.chart.AbstractChartDSLRuntimeModule#bindIValueConverterService()
*/
@Override
public Class<? extends IValueConverterService> bindIValueConverterService() {
return ChartValueConverterService.class;
}
/* (non-Javadoc)
* @see org.eclipse.osbp.xtext.chart.AbstractChartDSLRuntimeModule#configure(com.google.inject.Binder)
*/
@Override
public void configure(Binder binder) {
super.configure(binder);
binder.bind(IOutputConfigurationProvider.class).to(DSLOutputConfigurationProvider.class).in(Singleton.class);
}
/* (non-Javadoc)
* @see org.eclipse.osbp.xtext.chart.AbstractChartDSLRuntimeModule#bindXtextResource()
*/
public Class<? extends org.eclipse.xtext.resource.XtextResource> bindXtextResource() {
return SemanticLoadingResource.class;
}
/* (non-Javadoc)
* @see org.eclipse.osbp.xtext.chart.AbstractChartDSLRuntimeModule#bindILinker()
*/
public Class<? extends org.eclipse.xtext.linking.ILinker> bindILinker() {
return LazyJvmTypeLinker.class;
}
/**
* Bind serializer I transient value service.
*
* @return the class<? extends org.eclipse.xtext.serializer.sequencer. I transient value service>
*/
public Class<? extends org.eclipse.xtext.serializer.sequencer.ITransientValueService> bindSerializerITransientValueService() {
return LazyJvmTypeTransientValueService.class;
}
}