1 | /* |
---|
2 | * generated by Xtext |
---|
3 | */ |
---|
4 | package com.framsticks.framclipse; |
---|
5 | |
---|
6 | import org.eclipse.xtext.conversion.IValueConverterService; |
---|
7 | import org.eclipse.xtext.resource.IResourceDescription; |
---|
8 | import org.eclipse.xtext.scoping.impl.ImportUriResolver; |
---|
9 | import org.eclipse.xtext.service.SingletonBinding; |
---|
10 | |
---|
11 | import com.framsticks.framclipse.resource.FramScriptResourceDescriptionManager; |
---|
12 | import com.framsticks.framclipse.scoping.FramScriptImportUriResolver; |
---|
13 | import com.framsticks.framclipse.script.ConstantProvider; |
---|
14 | import com.framsticks.framclipse.script.ExpressionTraverser; |
---|
15 | import com.framsticks.framclipse.script.XMLConstantProvider; |
---|
16 | import com.framsticks.framclipse.script.context.Framscontext; |
---|
17 | import com.framsticks.framclipse.script.model.Framscript; |
---|
18 | import com.thoughtworks.xstream.XStream; |
---|
19 | |
---|
20 | /** |
---|
21 | * Use this class to register components to be used within the IDE. |
---|
22 | */ |
---|
23 | public class FramScriptRuntimeModule extends com.framsticks.framclipse.AbstractFramScriptRuntimeModule { |
---|
24 | |
---|
25 | @SingletonBinding |
---|
26 | public Class<? extends ExpressionTraverser> bindExpressionTraverser() { |
---|
27 | return ExpressionTraverser.class; |
---|
28 | } |
---|
29 | |
---|
30 | @SingletonBinding |
---|
31 | public Class<? extends ConstantProvider> bindConstantProvider() { |
---|
32 | return XMLConstantProvider.class; |
---|
33 | } |
---|
34 | |
---|
35 | @SingletonBinding |
---|
36 | public XStream bindXStream() { |
---|
37 | XStream xstream = new XStream(); |
---|
38 | xstream.processAnnotations(Framscript.class); |
---|
39 | xstream.processAnnotations(Framscontext.class); |
---|
40 | return xstream; |
---|
41 | } |
---|
42 | |
---|
43 | @SingletonBinding |
---|
44 | public Class<? extends IResourceDescription.Manager> bindIResourceDescription$Manager() { |
---|
45 | return FramScriptResourceDescriptionManager.class; |
---|
46 | } |
---|
47 | |
---|
48 | @SingletonBinding |
---|
49 | public Class<? extends ImportUriResolver> bindImportUriResolver() { |
---|
50 | return FramScriptImportUriResolver.class; |
---|
51 | } |
---|
52 | |
---|
53 | @Override |
---|
54 | public Class<? extends IValueConverterService> bindIValueConverterService() { |
---|
55 | return FramScriptValueConverterService.class; |
---|
56 | } |
---|
57 | |
---|
58 | } |
---|