blob: ed32c5fe09e258e50b7e7635a3c69761c4777180 [file] [log] [blame]
mparkeraf0780b2010-04-01 04:44:16 +00001module org.eclipse.amp.amf.abase.ABase
2
3import org.eclipse.emf.mwe.utils.*
4import org.eclipse.xtext.generator.*
5import org.eclipse.xtext.ui.generator.*
6
7var grammarURI = "classpath:/org/eclipse/amp/amf/abase/ABase.xtext"
8var file.extensions = "abase"
9var projectName = "org.eclipse.amp.amf.abase"
10var runtimeProject = "../${projectName}"
11
12Workflow {
13 bean = StandaloneSetup {
14 platformUri = "${runtimeProject}/.."
15 }
16
17 component = DirectoryCleaner {
18 directory = "${runtimeProject}/src-gen"
19 }
20
21 component = DirectoryCleaner {
22 directory = "${runtimeProject}.ui/src-gen"
23 }
24
25 component = Generator {
26 pathRtProject = runtimeProject
27 pathUiProject = "${runtimeProject}.ui"
28 projectNameRt = projectName
29 projectNameUi = "${projectName}.ui"
30
31 language = {
32 uri = grammarURI
33 fileExtensions = file.extensions
34
35 // Java API to access grammar elements (required by several other fragments)
36 fragment = grammarAccess.GrammarAccessFragment {}
37
38 // generates Java API for the generated EPackages
39 fragment = ecore.EcoreGeneratorFragment {
40 // referencedGenModels = "uri to genmodel, uri to next genmodel"
41 }
42
43 // the serialization component
44 fragment = parseTreeConstructor.ParseTreeConstructorFragment {}
45
46 // a custom ResourceFactory for use with EMF
47 fragment = resourceFactory.ResourceFactoryFragment {
48 fileExtensions = file.extensions
49 }
50
51 // the following fragment tries to use the Antlr Generator fragment which can be installed via update manager from http://download.itemis.com/updates/
52 fragment = AntlrDelegatingFragment {}
53
54 /*
55 If you don't want to use the Antlr fragment for some reason, remove the antlr fragment and uncomment the packrat parser fragment below.
56 fragment = parser.PackratParserFragment {}
57 */
58
59 // check-based API for validation
60 /*
61 fragment = validation.CheckFragment {}
62 */
63
64 // java-based API for validation
65 fragment = validation.JavaValidatorFragment {
66 composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
67 composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
68 }
69
70 // scoping and exporting API
71 fragment = scoping.ImportURIScopingFragment {}
72 fragment = exporting.SimpleNamesFragment {}
73
74 // scoping and exporting API
75 //fragment = scoping.ImportNamespacesScopingFragment {}
76 //fragment = exporting.QualifiedNamesFragment {}
77
78 // formatter API
79 fragment = formatting.FormatterFragment {}
80
81 // labeling API
82 fragment = labeling.LabelProviderFragment {}
83
84 // outline API
85 fragment = outline.TransformerFragment {}
86 fragment = outline.OutlineNodeAdapterFactoryFragment {}
87 fragment = outline.QuickOutlineFragment {}
88
89 // java-based API for content assistance
90 fragment = contentAssist.JavaBasedContentAssistFragment {}
91
92 // the following fragment tries to use the Antlr based content assist
93 // fragment which can be downloaded from http://www.itemis.com
94 // and will be ignored if it's not available.
95 fragment = DelegatingGeneratorFragment {
96 delegate = "de.itemis.xtext.antlr.XtextAntlrUiGeneratorFragment"
97 message="You are generating without ANTLR. It is highly recommended to download and use the plugin \'de.itemis.xtext.antlr\' \n\t using the update site http:\//download.itemis.com/updates/."
98 }
99
100 fragment = builder.BuilderIntegrationFragment {}
101
102 // project wizard (optional)
103 /*
104 fragment = projectWizard.SimpleProjectWizardFragment {
105 generatorProjectName = "${projectName}.generator"
106 modelFileExtension = file.extensions
107 }
108 */
109
110 // quickfix API
111 fragment = quickfix.QuickfixProviderFragment {}
112 }
113 }
114}