blob: b2e9e3a80e9dc2b7e7813a42ca38874dec2d4272 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/*******************************************************************************
* Copyright (c) 2012 Juergen Haug
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* CONTRIBUTORS:
* Juergen Haug
*
*******************************************************************************/
package org.eclipse.etrice.core;
import org.eclipse.etrice.core.common.scoping.CompoundGlobalScopeProvider;
import org.eclipse.etrice.core.common.scoping.ModelLocatorUriResolver;
import org.eclipse.etrice.core.common.scoping.ModelPathFileExtensionFilter;
import org.eclipse.etrice.core.common.scoping.ModelPathGlobalScopeProvider.IModelPathFileFilter;
import org.eclipse.etrice.core.converter.ConfigValueConverterService;
import org.eclipse.xtext.conversion.IValueConverterService;
import org.eclipse.xtext.scoping.IGlobalScopeProvider;
import org.eclipse.xtext.scoping.impl.ImportUriResolver;
/**
* Use this class to register components to be used at runtime / without the
* Equinox extension registry.
*/
public class ConfigRuntimeModule extends
org.eclipse.etrice.core.AbstractConfigRuntimeModule {
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
return CompoundGlobalScopeProvider.class;
}
public IModelPathFileFilter bindIModelPathFileFilter() {
return new ModelPathFileExtensionFilter("room");
}
// HOWTO: use URI imports - need special URI resolver
public Class<? extends ImportUriResolver> bindImportUriResolver() {
return ModelLocatorUriResolver.class;
}
@Override
public Class<? extends IValueConverterService> bindIValueConverterService() {
return ConfigValueConverterService.class;
}
}
|