mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
[generator] Reorganized dependency injection
Signed-off-by: Miro Spönemann <miro.spoenemann@itemis.de>
This commit is contained in:
parent
72839ab971
commit
ba1ee21786
13 changed files with 493 additions and 412 deletions
|
@ -7,7 +7,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.xtext.xtext.generator
|
||||
|
||||
import com.google.inject.Inject
|
||||
import com.google.inject.Injector
|
||||
import java.util.List
|
||||
|
||||
|
@ -16,18 +15,24 @@ import java.util.List
|
|||
*/
|
||||
class CompositeGeneratorFragment2 implements IGeneratorFragment2 {
|
||||
|
||||
@Inject Injector injector
|
||||
|
||||
val List<IGeneratorFragment2> fragments = newArrayList
|
||||
|
||||
def void addFragment(IGeneratorFragment2 fragment) {
|
||||
if (fragment === this)
|
||||
throw new IllegalArgumentException
|
||||
this.fragments.add(fragment)
|
||||
}
|
||||
|
||||
override generate() {
|
||||
override initialize(Injector injector) {
|
||||
injector.injectMembers(this)
|
||||
for (fragment : fragments) {
|
||||
injector.injectMembers(fragment)
|
||||
fragment.generate()
|
||||
fragment.initialize(injector)
|
||||
}
|
||||
}
|
||||
|
||||
override generate(LanguageConfig2 language) {
|
||||
for (fragment : fragments) {
|
||||
fragment.generate(language)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,35 @@ package org.eclipse.xtext.xtext.generator
|
|||
|
||||
import com.google.inject.Binder
|
||||
import org.eclipse.emf.ecore.resource.ResourceSet
|
||||
import org.eclipse.xtend.lib.annotations.Accessors
|
||||
import org.eclipse.xtext.parser.EclipseProjectPropertiesEncodingProvider
|
||||
import org.eclipse.xtext.parser.IEncodingProvider
|
||||
import org.eclipse.xtext.resource.XtextResourceSet
|
||||
import org.eclipse.xtext.service.AbstractGenericModule
|
||||
import org.eclipse.xtext.xtext.generator.model.CodeConfig
|
||||
import org.eclipse.xtext.xtext.generator.model.IXtextProjectConfig
|
||||
import org.eclipse.xtext.xtext.generator.model.XtextProjectConfig
|
||||
|
||||
class DefaultGeneratorModule extends AbstractGenericModule {
|
||||
|
||||
@Accessors
|
||||
XtextProjectConfig project
|
||||
|
||||
@Accessors
|
||||
CodeConfig code
|
||||
|
||||
def configureXtextProjectConfig(Binder binder) {
|
||||
if (project === null)
|
||||
project = new XtextProjectConfig
|
||||
binder.bind(IXtextProjectConfig).toInstance(project)
|
||||
}
|
||||
|
||||
def configureCodeConfig(Binder binder) {
|
||||
if (code === null)
|
||||
code = new CodeConfig
|
||||
binder.bind(CodeConfig).toInstance(code)
|
||||
}
|
||||
|
||||
def configureResourceSet(Binder binder) {
|
||||
binder.bind(ResourceSet).toInstance(new XtextResourceSet)
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ package org.eclipse.xtext.xtext.generator
|
|||
/**
|
||||
* A fragment that contributes to the {@link XtextGenerator}.
|
||||
*/
|
||||
interface IGeneratorFragment2 {
|
||||
interface IGeneratorFragment2 extends IGuiceAwareGeneratorComponent {
|
||||
|
||||
def void generate()
|
||||
def void generate(LanguageConfig2 language)
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015 itemis AG (http://www.itemis.eu) and others.
|
||||
* 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
|
||||
*******************************************************************************/
|
||||
package org.eclipse.xtext.xtext.generator
|
||||
|
||||
import com.google.inject.Injector
|
||||
|
||||
interface IGuiceAwareGeneratorComponent {
|
||||
|
||||
def void initialize(Injector injector)
|
||||
|
||||
}
|
|
@ -10,6 +10,7 @@ package org.eclipse.xtext.xtext.generator
|
|||
import com.google.common.base.Joiner
|
||||
import com.google.common.collect.Lists
|
||||
import com.google.inject.Inject
|
||||
import com.google.inject.Injector
|
||||
import com.google.inject.Provider
|
||||
import java.util.Collections
|
||||
import java.util.HashMap
|
||||
|
@ -80,23 +81,24 @@ class LanguageConfig2 extends CompositeGeneratorFragment2 {
|
|||
|
||||
def JavaFileAccess getRuntimeSetup() {
|
||||
if (runtimeSetupImpl === null)
|
||||
runtimeSetupImpl = generatorTemplates.startRuntimeGenSetup()
|
||||
runtimeSetupImpl = generatorTemplates.startRuntimeGenSetup(this)
|
||||
return runtimeSetupImpl
|
||||
}
|
||||
|
||||
def GuiceModuleAccess getRuntimeModule() {
|
||||
if (runtimeModule == null)
|
||||
runtimeModule = generatorTemplates.startRuntimeGenModule()
|
||||
runtimeModule = generatorTemplates.startRuntimeGenModule(this)
|
||||
return runtimeModule
|
||||
}
|
||||
|
||||
def GuiceModuleAccess getEclipsePluginModule() {
|
||||
if (eclipsePluginModule == null)
|
||||
eclipsePluginModule = generatorTemplates.startEclipsePluginGenModule()
|
||||
eclipsePluginModule = generatorTemplates.startEclipsePluginGenModule(this)
|
||||
return eclipsePluginModule
|
||||
}
|
||||
|
||||
def void initialize() {
|
||||
override initialize(Injector injector) {
|
||||
super.initialize(injector)
|
||||
val rs = resourceSetProvider.get()
|
||||
for (String loadedResource : loadedResources) {
|
||||
val loadedResourceUri = URI.createURI(loadedResource)
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
package org.eclipse.xtext.xtext.generator
|
||||
|
||||
import com.google.inject.Guice
|
||||
import com.google.inject.Inject
|
||||
import com.google.inject.Injector
|
||||
import com.google.inject.Module
|
||||
import java.io.File
|
||||
import java.util.List
|
||||
import org.eclipse.emf.mwe.core.WorkflowContext
|
||||
|
@ -18,12 +18,10 @@ import org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2
|
|||
import org.eclipse.emf.mwe.core.monitor.ProgressMonitor
|
||||
import org.eclipse.xtend.lib.annotations.Accessors
|
||||
import org.eclipse.xtext.XtextStandaloneSetup
|
||||
import org.eclipse.xtext.util.Modules2
|
||||
import org.eclipse.xtext.parser.IEncodingProvider
|
||||
import org.eclipse.xtext.xtext.generator.model.CodeConfig
|
||||
import org.eclipse.xtext.xtext.generator.model.IXtextProjectConfig
|
||||
import org.eclipse.xtext.xtext.generator.model.TextFileAccess
|
||||
import org.eclipse.xtext.xtext.generator.model.XtextProjectConfig
|
||||
import org.eclipse.xtext.parser.IEncodingProvider
|
||||
|
||||
/**
|
||||
* The Xtext language infrastructure generator. Can be configured with {@link IGeneratorFragment}
|
||||
|
@ -31,18 +29,24 @@ import org.eclipse.xtext.parser.IEncodingProvider
|
|||
*
|
||||
* <p><b>NOTE: This is a reimplementation of org.eclipse.xtext.generator.Generator</b></p>
|
||||
*/
|
||||
class XtextGenerator extends AbstractWorkflowComponent2 {
|
||||
class XtextGenerator extends AbstractWorkflowComponent2 implements IGuiceAwareGeneratorComponent {
|
||||
|
||||
@Accessors
|
||||
DefaultGeneratorModule configuration
|
||||
|
||||
@Accessors
|
||||
XtextProjectConfig projectConfig
|
||||
|
||||
@Accessors
|
||||
CodeConfig codeConfig
|
||||
|
||||
val List<Module> modules = newArrayList
|
||||
String activator
|
||||
|
||||
val List<LanguageConfig2> languageConfigs = newArrayList
|
||||
|
||||
Injector injector
|
||||
|
||||
@Inject IXtextProjectConfig projectConfig
|
||||
|
||||
@Inject XtextGeneratorTemplates templates
|
||||
|
||||
@Inject IEncodingProvider encodingProvider
|
||||
|
||||
new() {
|
||||
new XtextStandaloneSetup().createInjectorAndDoEMFRegistration()
|
||||
}
|
||||
|
@ -54,75 +58,83 @@ class XtextGenerator extends AbstractWorkflowComponent2 {
|
|||
this.languageConfigs.add(language)
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Guice modules to customize the behavior of the generator.
|
||||
*/
|
||||
def void addModule(Module module) {
|
||||
this.modules.add(module)
|
||||
protected def Injector createInjector() {
|
||||
if (injector === null) {
|
||||
if (configuration === null)
|
||||
configuration = new DefaultGeneratorModule
|
||||
injector = Guice.createInjector(configuration)
|
||||
initialize(injector)
|
||||
}
|
||||
return injector
|
||||
}
|
||||
|
||||
override initialize(Injector injector) {
|
||||
injector.injectMembers(this)
|
||||
projectConfig.initialize(injector)
|
||||
injector.getInstance(CodeConfig) => [ codeConfig |
|
||||
codeConfig.initialize(injector)
|
||||
]
|
||||
injector.getInstance(XtextGeneratorNaming) => [ naming |
|
||||
naming.eclipsePluginActivator = activator
|
||||
]
|
||||
}
|
||||
|
||||
protected override invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
|
||||
var IXtextProjectConfig project = projectConfig
|
||||
var IEncodingProvider encodingProvider
|
||||
val injector = createInjector()
|
||||
for (language : languageConfigs) {
|
||||
val injector = language.createInjector()
|
||||
|
||||
language.generate()
|
||||
val templates = injector.getInstance(XtextGeneratorTemplates)
|
||||
language.generateRuntimeSetup(project, templates)
|
||||
language.generateModules(project, templates)
|
||||
|
||||
if (project === null)
|
||||
project = injector.getInstance(IXtextProjectConfig)
|
||||
if (encodingProvider === null)
|
||||
encodingProvider = injector.getInstance(IEncodingProvider)
|
||||
}
|
||||
if (project !== null) {
|
||||
project.generateManifests()
|
||||
project.generatePluginXmls(encodingProvider)
|
||||
language.initialize(injector)
|
||||
language.generate(language)
|
||||
language.generateRuntimeSetup()
|
||||
language.generateModules()
|
||||
language.generateExecutableExtensionFactory()
|
||||
}
|
||||
generatePluginXmls()
|
||||
generateManifests()
|
||||
}
|
||||
|
||||
protected def generateRuntimeSetup(LanguageConfig2 language, IXtextProjectConfig project,
|
||||
XtextGeneratorTemplates templates) {
|
||||
templates.runtimeSetup.writeTo(project.runtimeSrc)
|
||||
templates.finishRuntimeGenSetup(language.runtimeSetup).writeTo(project.runtimeSrcGen)
|
||||
protected def generateRuntimeSetup(LanguageConfig2 language) {
|
||||
templates.getRuntimeSetup(language).writeTo(projectConfig.runtimeSrc)
|
||||
templates.finishRuntimeGenSetup(language.runtimeSetup).writeTo(projectConfig.runtimeSrcGen)
|
||||
}
|
||||
|
||||
protected def generateModules(LanguageConfig2 language, IXtextProjectConfig project,
|
||||
XtextGeneratorTemplates templates) {
|
||||
templates.runtimeModule.writeTo(project.runtimeSrc)
|
||||
templates.finishGenModule(language.runtimeModule).writeTo(project.runtimeSrcGen)
|
||||
if (project.eclipsePluginSrc !== null)
|
||||
templates.eclipsePluginModule.writeTo(project.eclipsePluginSrc)
|
||||
if (project.eclipsePluginSrcGen !== null)
|
||||
templates.finishGenModule(language.eclipsePluginModule).writeTo(project.eclipsePluginSrcGen)
|
||||
protected def generateModules(LanguageConfig2 language) {
|
||||
templates.getRuntimeModule(language).writeTo(projectConfig.runtimeSrc)
|
||||
templates.finishGenModule(language.runtimeModule).writeTo(projectConfig.runtimeSrcGen)
|
||||
if (projectConfig.eclipsePluginSrc !== null)
|
||||
templates.getEclipsePluginModule(language).writeTo(projectConfig.eclipsePluginSrc)
|
||||
if (projectConfig.eclipsePluginSrcGen !== null)
|
||||
templates.finishGenModule(language.eclipsePluginModule).writeTo(projectConfig.eclipsePluginSrcGen)
|
||||
}
|
||||
|
||||
protected def generateManifests(IXtextProjectConfig project) {
|
||||
project.runtimeManifest?.generate()
|
||||
project.runtimeTestManifest?.generate()
|
||||
project.genericIdeManifest?.generate()
|
||||
project.genericIdeTestManifest?.generate()
|
||||
project.eclipsePluginManifest?.generate()
|
||||
project.eclipsePluginTestManifest?.generate()
|
||||
project.ideaPluginManifest?.generate()
|
||||
project.ideaPluginTestManifest?.generate()
|
||||
project.webManifest?.generate()
|
||||
project.webTestManifest?.generate()
|
||||
protected def generateExecutableExtensionFactory(LanguageConfig2 language) {
|
||||
if (projectConfig.eclipsePluginSrcGen !== null)
|
||||
templates.getEclipsePluginExecutableExtensionFactory(language).writeTo(projectConfig.eclipsePluginSrcGen)
|
||||
}
|
||||
|
||||
protected def generatePluginXmls(IXtextProjectConfig project, IEncodingProvider encodingProvider) {
|
||||
generatePluginXml(project.runtimePluginXml, encodingProvider)
|
||||
generatePluginXml(project.runtimeTestPluginXml, encodingProvider)
|
||||
generatePluginXml(project.genericIdePluginXml, encodingProvider)
|
||||
generatePluginXml(project.genericIdeTestPluginXml, encodingProvider)
|
||||
generatePluginXml(project.eclipsePluginPluginXml, encodingProvider)
|
||||
generatePluginXml(project.eclipsePluginTestPluginXml, encodingProvider)
|
||||
generatePluginXml(project.ideaPluginPluginXml, encodingProvider)
|
||||
generatePluginXml(project.ideaPluginTestPluginXml, encodingProvider)
|
||||
generatePluginXml(project.webPluginXml, encodingProvider)
|
||||
generatePluginXml(project.webTestPluginXml, encodingProvider)
|
||||
protected def generateManifests() {
|
||||
projectConfig.runtimeManifest?.generate()
|
||||
projectConfig.runtimeTestManifest?.generate()
|
||||
projectConfig.genericIdeManifest?.generate()
|
||||
projectConfig.genericIdeTestManifest?.generate()
|
||||
projectConfig.eclipsePluginManifest?.generate()
|
||||
projectConfig.eclipsePluginTestManifest?.generate()
|
||||
projectConfig.ideaPluginManifest?.generate()
|
||||
projectConfig.ideaPluginTestManifest?.generate()
|
||||
projectConfig.webManifest?.generate()
|
||||
projectConfig.webTestManifest?.generate()
|
||||
}
|
||||
|
||||
protected def generatePluginXmls() {
|
||||
generatePluginXml(projectConfig.runtimePluginXml, encodingProvider)
|
||||
generatePluginXml(projectConfig.runtimeTestPluginXml, encodingProvider)
|
||||
generatePluginXml(projectConfig.genericIdePluginXml, encodingProvider)
|
||||
generatePluginXml(projectConfig.genericIdeTestPluginXml, encodingProvider)
|
||||
generatePluginXml(projectConfig.eclipsePluginPluginXml, encodingProvider)
|
||||
generatePluginXml(projectConfig.eclipsePluginTestPluginXml, encodingProvider)
|
||||
generatePluginXml(projectConfig.ideaPluginPluginXml, encodingProvider)
|
||||
generatePluginXml(projectConfig.ideaPluginTestPluginXml, encodingProvider)
|
||||
generatePluginXml(projectConfig.webPluginXml, encodingProvider)
|
||||
generatePluginXml(projectConfig.webTestPluginXml, encodingProvider)
|
||||
}
|
||||
|
||||
protected def generatePluginXml(TextFileAccess pluginXml, IEncodingProvider encodingProvider) {
|
||||
|
@ -139,35 +151,4 @@ class XtextGenerator extends AbstractWorkflowComponent2 {
|
|||
}
|
||||
}
|
||||
|
||||
protected def Injector createInjector(LanguageConfig2 languageConfig) {
|
||||
val guiceConfig = <Module>newArrayList(new DefaultGeneratorModule)
|
||||
guiceConfig.addAll(modules)
|
||||
guiceConfig.add([
|
||||
bind(LanguageConfig2).toInstance(languageConfig)
|
||||
])
|
||||
if (projectConfig !== null) {
|
||||
guiceConfig.add([
|
||||
bind(IXtextProjectConfig).toInstance(projectConfig)
|
||||
])
|
||||
}
|
||||
if (codeConfig !== null) {
|
||||
guiceConfig.add([
|
||||
bind(CodeConfig).toInstance(codeConfig)
|
||||
])
|
||||
}
|
||||
val injector = Guice.createInjector(Modules2.mixin(guiceConfig))
|
||||
|
||||
injector.injectMembers(languageConfig)
|
||||
languageConfig.initialize()
|
||||
if (projectConfig !== null) {
|
||||
injector.injectMembers(projectConfig)
|
||||
projectConfig.initialize()
|
||||
}
|
||||
if (codeConfig !== null) {
|
||||
injector.injectMembers(codeConfig)
|
||||
codeConfig.initialize()
|
||||
}
|
||||
return injector
|
||||
}
|
||||
|
||||
}
|
|
@ -7,12 +7,18 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.xtext.xtext.generator
|
||||
|
||||
import com.google.inject.Singleton
|
||||
import org.eclipse.xtend.lib.annotations.Accessors
|
||||
import org.eclipse.xtext.Grammar
|
||||
|
||||
import static org.eclipse.xtext.GrammarUtil.*
|
||||
|
||||
@Singleton
|
||||
class XtextGeneratorNaming {
|
||||
|
||||
@Accessors(PUBLIC_SETTER)
|
||||
String eclipsePluginActivator
|
||||
|
||||
def getPackage(String qualifiedName) {
|
||||
qualifiedName.substring(0, qualifiedName.lastIndexOf('.'))
|
||||
}
|
||||
|
@ -26,11 +32,11 @@ class XtextGeneratorNaming {
|
|||
}
|
||||
|
||||
def getRuntimeModule(Grammar grammar) {
|
||||
grammar.runtimeBasePackage + getName(grammar) + 'RuntimeModule'
|
||||
grammar.runtimeBasePackage + '.' + getName(grammar) + 'RuntimeModule'
|
||||
}
|
||||
|
||||
def getRuntimeGenModule(Grammar grammar) {
|
||||
grammar.runtimeBasePackage + 'Abstract' + getName(grammar) + 'RuntimeModule'
|
||||
grammar.runtimeBasePackage + '.Abstract' + getName(grammar) + 'RuntimeModule'
|
||||
}
|
||||
|
||||
def getRuntimeDefaultModule(Grammar grammar) {
|
||||
|
@ -38,11 +44,11 @@ class XtextGeneratorNaming {
|
|||
}
|
||||
|
||||
def getRuntimeSetup(Grammar grammar) {
|
||||
grammar.runtimeBasePackage + getName(grammar) + 'StandaloneSetup'
|
||||
grammar.runtimeBasePackage + '.' + getName(grammar) + 'StandaloneSetup'
|
||||
}
|
||||
|
||||
def getRuntimeGenSetup(Grammar grammar) {
|
||||
grammar.runtimeBasePackage + getName(grammar) + 'StandaloneSetupGenerated'
|
||||
grammar.runtimeBasePackage + '.' + getName(grammar) + 'StandaloneSetupGenerated'
|
||||
}
|
||||
|
||||
def getEclipsePluginBasePackage(Grammar grammar) {
|
||||
|
@ -50,15 +56,26 @@ class XtextGeneratorNaming {
|
|||
}
|
||||
|
||||
def getEclipsePluginModule(Grammar grammar) {
|
||||
grammar.eclipsePluginBasePackage + getName(grammar) + 'UiModule'
|
||||
grammar.eclipsePluginBasePackage + '.' + getName(grammar) + 'UiModule'
|
||||
}
|
||||
|
||||
def getEclipsePluginGenModule(Grammar grammar) {
|
||||
grammar.eclipsePluginBasePackage + 'Abstract' + getName(grammar) + 'UiModule'
|
||||
grammar.eclipsePluginBasePackage + '.' + 'Abstract' + getName(grammar) + 'UiModule'
|
||||
}
|
||||
|
||||
def getEclipsePluginDefaultModule(Grammar grammar) {
|
||||
'org.eclipse.xtext.ui.DefaultUiModule'
|
||||
}
|
||||
|
||||
def getEclipsePluginExecutableExtensionFactory(Grammar grammar) {
|
||||
grammar.eclipsePluginBasePackage + '.' + getName(grammar) + 'ExecutableExtensionFactory'
|
||||
}
|
||||
|
||||
def getEclipsePluginActivator(Grammar grammar) {
|
||||
if (eclipsePluginActivator === null) {
|
||||
eclipsePluginActivator = grammar.eclipsePluginBasePackage + '.internal.' + getName(grammar) + 'Activator'
|
||||
}
|
||||
return eclipsePluginActivator
|
||||
}
|
||||
|
||||
}
|
|
@ -19,8 +19,6 @@ class XtextGeneratorTemplates {
|
|||
|
||||
@Inject extension XtextGeneratorNaming
|
||||
|
||||
@Inject LanguageConfig2 langConfig
|
||||
|
||||
@Inject CodeConfig codeConfig
|
||||
|
||||
def TextFileAccess startPluginXml(TextFileAccess file) {
|
||||
|
@ -41,10 +39,10 @@ class XtextGeneratorTemplates {
|
|||
return file
|
||||
}
|
||||
|
||||
def JavaFileAccess getRuntimeSetup() {
|
||||
val grammar = langConfig.grammar
|
||||
val javaFile = new JavaFileAccess(grammar.runtimeSetup, codeConfig)
|
||||
val runtimeSetupImpl = javaFile.imported(grammar.runtimeGenSetup)
|
||||
def JavaFileAccess getRuntimeSetup(LanguageConfig2 langConfig) {
|
||||
val g = langConfig.grammar
|
||||
val javaFile = new JavaFileAccess(g.runtimeSetup, codeConfig)
|
||||
val runtimeSetupImpl = javaFile.imported(g.runtimeGenSetup)
|
||||
|
||||
javaFile.typeComment = '''
|
||||
/**
|
||||
|
@ -52,10 +50,10 @@ class XtextGeneratorTemplates {
|
|||
*/
|
||||
'''
|
||||
javaFile.codeFragments += '''
|
||||
public class «grammar.runtimeSetup.simple» extends «runtimeSetupImpl»{
|
||||
public class «g.runtimeSetup.simple» extends «runtimeSetupImpl»{
|
||||
|
||||
public static void doSetup() {
|
||||
new «grammar.runtimeSetup.simple»().createInjectorAndDoEMFRegistration();
|
||||
new «g.runtimeSetup.simple»().createInjectorAndDoEMFRegistration();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -63,9 +61,9 @@ class XtextGeneratorTemplates {
|
|||
return javaFile
|
||||
}
|
||||
|
||||
def JavaFileAccess startRuntimeGenSetup() {
|
||||
val grammar = langConfig.grammar
|
||||
val javaFile = new JavaFileAccess(grammar.runtimeGenSetup, codeConfig)
|
||||
def JavaFileAccess startRuntimeGenSetup(LanguageConfig2 langConfig) {
|
||||
val g = langConfig.grammar
|
||||
val javaFile = new JavaFileAccess(g.runtimeGenSetup, codeConfig)
|
||||
javaFile.imported('org.eclipse.emf.ecore.EPackage')
|
||||
javaFile.imported('org.eclipse.emf.ecore.resource.Resource')
|
||||
javaFile.imported('org.eclipse.xtext.ISetup')
|
||||
|
@ -74,11 +72,11 @@ class XtextGeneratorTemplates {
|
|||
javaFile.imported('com.google.inject.Injector')
|
||||
javaFile.imported('java.util.List')
|
||||
javaFile.imported('java.util.Arrays')
|
||||
val runtimeGuiceModule = javaFile.imported(grammar.runtimeModule)
|
||||
val usedRuntimeSetups = grammar.usedGrammars.map[javaFile.imported(it.runtimeSetup)]
|
||||
val runtimeGuiceModule = javaFile.imported(g.runtimeModule)
|
||||
val usedRuntimeSetups = g.usedGrammars.map[javaFile.imported(it.runtimeSetup)]
|
||||
|
||||
javaFile.codeFragments += '''
|
||||
public class «grammar.runtimeGenSetup.simple» implements ISetup, ISetupExtension {
|
||||
public class «g.runtimeGenSetup.simple» implements ISetup, ISetupExtension {
|
||||
|
||||
@Override
|
||||
public List<String> getFileExtensions() {
|
||||
|
@ -90,7 +88,7 @@ class XtextGeneratorTemplates {
|
|||
«FOR usedSetup : usedRuntimeSetups»
|
||||
«usedSetup».doSetup();
|
||||
«ENDFOR»
|
||||
«IF grammar.usedGrammars.isEmpty»
|
||||
«IF g.usedGrammars.isEmpty»
|
||||
// register default ePackages
|
||||
if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
|
||||
|
@ -146,50 +144,50 @@ class XtextGeneratorTemplates {
|
|||
sequence.length > 0 && sequence.charAt(sequence.length - 1) == c
|
||||
}
|
||||
|
||||
def JavaFileAccess getRuntimeModule() {
|
||||
val grammar = langConfig.grammar
|
||||
val javaFile = new JavaFileAccess(grammar.runtimeModule, codeConfig)
|
||||
val runtimeGeneratedModule = javaFile.imported(grammar.runtimeGenModule)
|
||||
def JavaFileAccess getRuntimeModule(LanguageConfig2 langConfig) {
|
||||
val g = langConfig.grammar
|
||||
val javaFile = new JavaFileAccess(g.runtimeModule, codeConfig)
|
||||
val runtimeGeneratedModule = javaFile.imported(g.runtimeGenModule)
|
||||
javaFile.typeComment = '''
|
||||
/**
|
||||
* Use this class to register components to be used at runtime / without the Equinox extension registry.
|
||||
*/
|
||||
'''
|
||||
javaFile.codeFragments += '''
|
||||
public class «grammar.runtimeModule.simple» extends «runtimeGeneratedModule» {
|
||||
public class «g.runtimeModule.simple» extends «runtimeGeneratedModule» {
|
||||
|
||||
}
|
||||
'''
|
||||
return javaFile
|
||||
}
|
||||
|
||||
def GuiceModuleAccess startRuntimeGenModule() {
|
||||
val grammar = langConfig.grammar
|
||||
val module = new GuiceModuleAccess(grammar.runtimeGenModule, codeConfig)
|
||||
def GuiceModuleAccess startRuntimeGenModule(LanguageConfig2 langConfig) {
|
||||
val g = langConfig.grammar
|
||||
val module = new GuiceModuleAccess(g.runtimeGenModule, codeConfig)
|
||||
module.imported('java.util.Properties')
|
||||
module.imported('org.eclipse.xtext.Constants')
|
||||
module.imported('com.google.inject.Binder')
|
||||
module.imported('com.google.inject.name.Names')
|
||||
val runtimeDefaultModule = module.imported(grammar.runtimeDefaultModule)
|
||||
val runtimeDefaultModule = module.imported(g.runtimeDefaultModule)
|
||||
|
||||
module.typeComment = '''
|
||||
/**
|
||||
* Manual modifications go to {@link «grammar.runtimeModule.simple»}.
|
||||
* Manual modifications go to {@link «g.runtimeModule.simple»}.
|
||||
*/
|
||||
'''
|
||||
module.codeFragments += '''
|
||||
public abstract class «grammar.runtimeGenModule.simple» extends «runtimeDefaultModule» {
|
||||
public abstract class «g.runtimeGenModule.simple» extends «runtimeDefaultModule» {
|
||||
|
||||
protected Properties properties = null;
|
||||
|
||||
@Override
|
||||
public void configure(Binder binder) {
|
||||
properties = tryBindProperties(binder, "«grammar.name.replaceAll("\\.","/")».properties");
|
||||
properties = tryBindProperties(binder, "«g.name.replaceAll("\\.","/")».properties");
|
||||
super.configure(binder);
|
||||
}
|
||||
|
||||
public void configureLanguageName(Binder binder) {
|
||||
binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("«grammar.name»");
|
||||
binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("«g.name»");
|
||||
}
|
||||
|
||||
public void configureFileExtensions(Binder binder) {
|
||||
|
@ -201,7 +199,7 @@ class XtextGeneratorTemplates {
|
|||
return module
|
||||
}
|
||||
|
||||
def JavaFileAccess getEclipsePluginModule() {
|
||||
def JavaFileAccess getEclipsePluginModule(LanguageConfig2 langConfig) {
|
||||
val g = langConfig.grammar
|
||||
val javaFile = new JavaFileAccess(g.eclipsePluginModule, codeConfig)
|
||||
val eclipsePluginGenGuiceModule = javaFile.imported(g.eclipsePluginGenModule)
|
||||
|
@ -221,7 +219,7 @@ class XtextGeneratorTemplates {
|
|||
return javaFile
|
||||
}
|
||||
|
||||
def GuiceModuleAccess startEclipsePluginGenModule() {
|
||||
def GuiceModuleAccess startEclipsePluginGenModule(LanguageConfig2 langConfig) {
|
||||
val g = langConfig.grammar
|
||||
val module = new GuiceModuleAccess(g.eclipsePluginGenModule, codeConfig)
|
||||
module.imported('org.eclipse.ui.plugin.AbstractUIPlugin')
|
||||
|
@ -277,4 +275,37 @@ class XtextGeneratorTemplates {
|
|||
return module
|
||||
}
|
||||
|
||||
def JavaFileAccess getEclipsePluginExecutableExtensionFactory(LanguageConfig2 langConfig) {
|
||||
val g = langConfig.grammar
|
||||
val javaFile = new JavaFileAccess(g.eclipsePluginExecutableExtensionFactory, codeConfig)
|
||||
javaFile.imported('org.osgi.framework.Bundle')
|
||||
javaFile.imported('com.google.inject.Injector')
|
||||
val superClass = javaFile.imported('org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory')
|
||||
val activator = javaFile.imported(g.eclipsePluginActivator)
|
||||
|
||||
javaFile.typeComment = '''
|
||||
/**
|
||||
* This class was generated. Customizations should only happen in a newly
|
||||
* introduced subclass.
|
||||
*/
|
||||
'''
|
||||
javaFile.codeFragments += '''
|
||||
public class «g.eclipsePluginExecutableExtensionFactory.simple» extends «superClass» {
|
||||
|
||||
@Override
|
||||
protected Bundle getBundle() {
|
||||
return «activator».getInstance().getBundle();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Injector getInjector() {
|
||||
return «activator».getInstance().getInjector(«activator».«g.name.toUpperCase.replaceAll('\\.', '_')»);
|
||||
}
|
||||
|
||||
}
|
||||
'''
|
||||
javaFile.markedAsGenerated = true
|
||||
return javaFile
|
||||
}
|
||||
|
||||
}
|
|
@ -55,13 +55,14 @@ class ProjectConfigGenerator {
|
|||
package «INTERFACE_NAME.substring(0, INTERFACE_NAME.lastIndexOf('.'))»;
|
||||
|
||||
import org.eclipse.xtext.generator.IFileSystemAccess2;
|
||||
import org.eclipse.xtext.xtext.generator.IGuiceAwareGeneratorComponent;
|
||||
|
||||
/**
|
||||
* Inject an instance of this interface in order to generate code in a generator fragment.
|
||||
*
|
||||
* <p>This file has been generated with {@link «ProjectConfigGenerator.name»}.</p>
|
||||
*/
|
||||
public interface «INTERFACE_NAME.substring(INTERFACE_NAME.lastIndexOf('.') + 1)» {
|
||||
public interface «INTERFACE_NAME.substring(INTERFACE_NAME.lastIndexOf('.') + 1)» extends IGuiceAwareGeneratorComponent {
|
||||
|
||||
«FOR p : PROJECTS»
|
||||
IFileSystemAccess2 get«p.toFirstUpper»Src();
|
||||
|
@ -86,9 +87,8 @@ class ProjectConfigGenerator {
|
|||
*******************************************************************************/
|
||||
package «IMPL_NAME.substring(0, IMPL_NAME.lastIndexOf('.'))»;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Injector;
|
||||
import org.eclipse.xtext.generator.IFileSystemAccess2;
|
||||
import org.eclipse.xtext.parser.IEncodingProvider;
|
||||
|
||||
/**
|
||||
* Use this class to configure output paths in the XtextGenerator.
|
||||
|
@ -97,91 +97,93 @@ class ProjectConfigGenerator {
|
|||
*/
|
||||
public class «IMPL_NAME.substring(IMPL_NAME.lastIndexOf('.') + 1)» implements «INTERFACE_NAME.substring(INTERFACE_NAME.lastIndexOf('.') + 1)» {
|
||||
|
||||
@Inject private IEncodingProvider encodingProvider;
|
||||
|
||||
«FOR p : PROJECTS»
|
||||
private String «p»SrcPath;
|
||||
private String «p»SrcGenPath;
|
||||
private ManifestAccess «p»ManifestAccess;
|
||||
private TextFileAccess «p»PluginXmlAccess;
|
||||
private FileSystemAccess «p»Src;
|
||||
private FileSystemAccess «p»SrcGen;
|
||||
private ManifestAccess «p»Manifest;
|
||||
private TextFileAccess «p»PluginXml;
|
||||
«ENDFOR»
|
||||
private String orionJsGenPath;
|
||||
private String aceJsGenPath;
|
||||
private FileSystemAccess orionJsGen;
|
||||
private FileSystemAccess aceJsGen;
|
||||
|
||||
public void initialize() {
|
||||
@Override
|
||||
public void initialize(Injector injector) {
|
||||
injector.injectMembers(this);
|
||||
«FOR p : PROJECTS»
|
||||
if («p»Src != null) {
|
||||
«p»Src.initialize(injector);
|
||||
}
|
||||
if («p»SrcGen != null) {
|
||||
«p»SrcGen.initialize(injector);
|
||||
}
|
||||
«ENDFOR»
|
||||
if (orionJsGen != null) {
|
||||
orionJsGen.initialize(injector);
|
||||
}
|
||||
if (aceJsGen != null) {
|
||||
aceJsGen.initialize(injector);
|
||||
}
|
||||
}
|
||||
|
||||
«FOR p : PROJECTS»
|
||||
@Override
|
||||
public IFileSystemAccess2 get«p.toFirstUpper»Src() {
|
||||
if («p»SrcPath != null)
|
||||
return new FileSystemAccess(«p»SrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return «p»Src;
|
||||
}
|
||||
|
||||
public void set«p.toFirstUpper»Src(String path) {
|
||||
this.«p»SrcPath = path;
|
||||
this.«p»Src = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 get«p.toFirstUpper»SrcGen() {
|
||||
if («p»SrcGenPath != null)
|
||||
return new FileSystemAccess(«p»SrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return «p»SrcGen;
|
||||
}
|
||||
|
||||
public void set«p.toFirstUpper»SrcGen(String path) {
|
||||
this.«p»SrcGenPath = path;
|
||||
this.«p»SrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess get«p.toFirstUpper»Manifest() {
|
||||
return «p»ManifestAccess;
|
||||
return «p»Manifest;
|
||||
}
|
||||
|
||||
public void set«p.toFirstUpper»Manifest(ManifestAccess manifest) {
|
||||
this.«p»ManifestAccess = manifest;
|
||||
this.«p»Manifest = manifest;
|
||||
}
|
||||
|
||||
public void set«p.toFirstUpper»PluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.«p»PluginXmlAccess = new TextFileAccess();
|
||||
this.«p»PluginXmlAccess.setPath(path);
|
||||
this.«p»PluginXml = new TextFileAccess();
|
||||
this.«p»PluginXml.setPath(path);
|
||||
} else {
|
||||
this.«p»PluginXmlAccess = null;
|
||||
this.«p»PluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess get«p.toFirstUpper»PluginXml() {
|
||||
return this.«p»PluginXmlAccess;
|
||||
return this.«p»PluginXml;
|
||||
}
|
||||
|
||||
«ENDFOR»
|
||||
@Override
|
||||
public IFileSystemAccess2 getOrionJsGen() {
|
||||
if (orionJsGenPath != null)
|
||||
return new FileSystemAccess(orionJsGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return orionJsGen;
|
||||
}
|
||||
|
||||
public void setOrionJsGen(String path) {
|
||||
this.orionJsGenPath = path;
|
||||
this.orionJsGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getAceJsGen() {
|
||||
if (aceJsGenPath != null)
|
||||
return new FileSystemAccess(aceJsGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return aceJsGen;
|
||||
}
|
||||
|
||||
public void setAceJsGen(String path) {
|
||||
this.aceJsGenPath = path;
|
||||
this.aceJsGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.xtext.xtext.generator.model
|
||||
|
||||
import com.google.inject.Injector
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
import java.net.URL
|
||||
|
@ -17,11 +18,12 @@ import java.util.jar.Manifest
|
|||
import org.eclipse.emf.common.EMFPlugin
|
||||
import org.eclipse.xtend.lib.annotations.Accessors
|
||||
import org.eclipse.xtext.util.Strings
|
||||
import org.eclipse.xtext.xtext.generator.IGuiceAwareGeneratorComponent
|
||||
|
||||
/**
|
||||
* Configuration object for generated code.
|
||||
*/
|
||||
class CodeConfig {
|
||||
class CodeConfig implements IGuiceAwareGeneratorComponent {
|
||||
|
||||
static val FILE_HEADER_VAR_TIME = '${time}'
|
||||
static val FILE_HEADER_VAR_DATE = '${date}'
|
||||
|
@ -61,7 +63,8 @@ class CodeConfig {
|
|||
this.classAnnotations.add(annotation)
|
||||
}
|
||||
|
||||
def initialize() {
|
||||
override initialize(Injector injector) {
|
||||
injector.injectMembers(this)
|
||||
var fileHeader = fileHeaderTemplate
|
||||
if (fileHeader != null) {
|
||||
if (fileHeader.contains(FILE_HEADER_VAR_TIME)) {
|
||||
|
|
|
@ -8,28 +8,30 @@
|
|||
package org.eclipse.xtext.xtext.generator.model
|
||||
|
||||
import com.google.common.io.Files
|
||||
import com.google.inject.Inject
|
||||
import com.google.inject.Injector
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.InputStream
|
||||
import java.nio.charset.Charset
|
||||
import org.eclipse.emf.common.util.URI
|
||||
import org.eclipse.xtend.lib.annotations.Accessors
|
||||
import org.eclipse.xtext.generator.IFileSystemAccess2
|
||||
import org.eclipse.xtext.parser.IEncodingProvider
|
||||
import org.eclipse.xtext.util.RuntimeIOException
|
||||
import org.eclipse.xtext.xtext.generator.IGuiceAwareGeneratorComponent
|
||||
|
||||
class FileSystemAccess implements IFileSystemAccess2 {
|
||||
class FileSystemAccess implements IFileSystemAccess2, IGuiceAwareGeneratorComponent {
|
||||
|
||||
@Accessors
|
||||
val String path
|
||||
@Inject IEncodingProvider encodingProvider
|
||||
|
||||
val URI baseUri
|
||||
val IEncodingProvider encodingProvider
|
||||
|
||||
new(String path, IEncodingProvider encodingProvider) {
|
||||
this.path = path
|
||||
new(String path) {
|
||||
this.baseUri = URI.createFileURI(path)
|
||||
this.encodingProvider = encodingProvider
|
||||
}
|
||||
|
||||
override initialize(Injector injector) {
|
||||
injector.injectMembers(this)
|
||||
}
|
||||
|
||||
protected def getCharset(URI uri) {
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
package org.eclipse.xtext.xtext.generator.model;
|
||||
|
||||
import org.eclipse.xtext.generator.IFileSystemAccess2;
|
||||
import org.eclipse.xtext.xtext.generator.IGuiceAwareGeneratorComponent;
|
||||
|
||||
/**
|
||||
* Inject an instance of this interface in order to generate code in a generator fragment.
|
||||
*
|
||||
* <p>This file has been generated with {@link org.eclipse.xtext.xtext.generator.internal.ProjectConfigGenerator}.</p>
|
||||
*/
|
||||
public interface IXtextProjectConfig {
|
||||
public interface IXtextProjectConfig extends IGuiceAwareGeneratorComponent {
|
||||
|
||||
IFileSystemAccess2 getRuntimeSrc();
|
||||
IFileSystemAccess2 getRuntimeSrcGen();
|
||||
|
|
|
@ -7,9 +7,8 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.xtext.xtext.generator.model;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Injector;
|
||||
import org.eclipse.xtext.generator.IFileSystemAccess2;
|
||||
import org.eclipse.xtext.parser.IEncodingProvider;
|
||||
|
||||
/**
|
||||
* Use this class to configure output paths in the XtextGenerator.
|
||||
|
@ -18,546 +17,546 @@ import org.eclipse.xtext.parser.IEncodingProvider;
|
|||
*/
|
||||
public class XtextProjectConfig implements IXtextProjectConfig {
|
||||
|
||||
@Inject private IEncodingProvider encodingProvider;
|
||||
private FileSystemAccess runtimeSrc;
|
||||
private FileSystemAccess runtimeSrcGen;
|
||||
private ManifestAccess runtimeManifest;
|
||||
private TextFileAccess runtimePluginXml;
|
||||
private FileSystemAccess runtimeTestSrc;
|
||||
private FileSystemAccess runtimeTestSrcGen;
|
||||
private ManifestAccess runtimeTestManifest;
|
||||
private TextFileAccess runtimeTestPluginXml;
|
||||
private FileSystemAccess genericIdeSrc;
|
||||
private FileSystemAccess genericIdeSrcGen;
|
||||
private ManifestAccess genericIdeManifest;
|
||||
private TextFileAccess genericIdePluginXml;
|
||||
private FileSystemAccess genericIdeTestSrc;
|
||||
private FileSystemAccess genericIdeTestSrcGen;
|
||||
private ManifestAccess genericIdeTestManifest;
|
||||
private TextFileAccess genericIdeTestPluginXml;
|
||||
private FileSystemAccess eclipsePluginSrc;
|
||||
private FileSystemAccess eclipsePluginSrcGen;
|
||||
private ManifestAccess eclipsePluginManifest;
|
||||
private TextFileAccess eclipsePluginPluginXml;
|
||||
private FileSystemAccess eclipsePluginTestSrc;
|
||||
private FileSystemAccess eclipsePluginTestSrcGen;
|
||||
private ManifestAccess eclipsePluginTestManifest;
|
||||
private TextFileAccess eclipsePluginTestPluginXml;
|
||||
private FileSystemAccess ideaPluginSrc;
|
||||
private FileSystemAccess ideaPluginSrcGen;
|
||||
private ManifestAccess ideaPluginManifest;
|
||||
private TextFileAccess ideaPluginPluginXml;
|
||||
private FileSystemAccess ideaPluginTestSrc;
|
||||
private FileSystemAccess ideaPluginTestSrcGen;
|
||||
private ManifestAccess ideaPluginTestManifest;
|
||||
private TextFileAccess ideaPluginTestPluginXml;
|
||||
private FileSystemAccess webSrc;
|
||||
private FileSystemAccess webSrcGen;
|
||||
private ManifestAccess webManifest;
|
||||
private TextFileAccess webPluginXml;
|
||||
private FileSystemAccess webTestSrc;
|
||||
private FileSystemAccess webTestSrcGen;
|
||||
private ManifestAccess webTestManifest;
|
||||
private TextFileAccess webTestPluginXml;
|
||||
private FileSystemAccess orionJsGen;
|
||||
private FileSystemAccess aceJsGen;
|
||||
|
||||
private String runtimeSrcPath;
|
||||
private String runtimeSrcGenPath;
|
||||
private ManifestAccess runtimeManifestAccess;
|
||||
private TextFileAccess runtimePluginXmlAccess;
|
||||
private String runtimeTestSrcPath;
|
||||
private String runtimeTestSrcGenPath;
|
||||
private ManifestAccess runtimeTestManifestAccess;
|
||||
private TextFileAccess runtimeTestPluginXmlAccess;
|
||||
private String genericIdeSrcPath;
|
||||
private String genericIdeSrcGenPath;
|
||||
private ManifestAccess genericIdeManifestAccess;
|
||||
private TextFileAccess genericIdePluginXmlAccess;
|
||||
private String genericIdeTestSrcPath;
|
||||
private String genericIdeTestSrcGenPath;
|
||||
private ManifestAccess genericIdeTestManifestAccess;
|
||||
private TextFileAccess genericIdeTestPluginXmlAccess;
|
||||
private String eclipsePluginSrcPath;
|
||||
private String eclipsePluginSrcGenPath;
|
||||
private ManifestAccess eclipsePluginManifestAccess;
|
||||
private TextFileAccess eclipsePluginPluginXmlAccess;
|
||||
private String eclipsePluginTestSrcPath;
|
||||
private String eclipsePluginTestSrcGenPath;
|
||||
private ManifestAccess eclipsePluginTestManifestAccess;
|
||||
private TextFileAccess eclipsePluginTestPluginXmlAccess;
|
||||
private String ideaPluginSrcPath;
|
||||
private String ideaPluginSrcGenPath;
|
||||
private ManifestAccess ideaPluginManifestAccess;
|
||||
private TextFileAccess ideaPluginPluginXmlAccess;
|
||||
private String ideaPluginTestSrcPath;
|
||||
private String ideaPluginTestSrcGenPath;
|
||||
private ManifestAccess ideaPluginTestManifestAccess;
|
||||
private TextFileAccess ideaPluginTestPluginXmlAccess;
|
||||
private String webSrcPath;
|
||||
private String webSrcGenPath;
|
||||
private ManifestAccess webManifestAccess;
|
||||
private TextFileAccess webPluginXmlAccess;
|
||||
private String webTestSrcPath;
|
||||
private String webTestSrcGenPath;
|
||||
private ManifestAccess webTestManifestAccess;
|
||||
private TextFileAccess webTestPluginXmlAccess;
|
||||
private String orionJsGenPath;
|
||||
private String aceJsGenPath;
|
||||
|
||||
public void initialize() {
|
||||
@Override
|
||||
public void initialize(Injector injector) {
|
||||
injector.injectMembers(this);
|
||||
if (runtimeSrc != null) {
|
||||
runtimeSrc.initialize(injector);
|
||||
}
|
||||
if (runtimeSrcGen != null) {
|
||||
runtimeSrcGen.initialize(injector);
|
||||
}
|
||||
if (runtimeTestSrc != null) {
|
||||
runtimeTestSrc.initialize(injector);
|
||||
}
|
||||
if (runtimeTestSrcGen != null) {
|
||||
runtimeTestSrcGen.initialize(injector);
|
||||
}
|
||||
if (genericIdeSrc != null) {
|
||||
genericIdeSrc.initialize(injector);
|
||||
}
|
||||
if (genericIdeSrcGen != null) {
|
||||
genericIdeSrcGen.initialize(injector);
|
||||
}
|
||||
if (genericIdeTestSrc != null) {
|
||||
genericIdeTestSrc.initialize(injector);
|
||||
}
|
||||
if (genericIdeTestSrcGen != null) {
|
||||
genericIdeTestSrcGen.initialize(injector);
|
||||
}
|
||||
if (eclipsePluginSrc != null) {
|
||||
eclipsePluginSrc.initialize(injector);
|
||||
}
|
||||
if (eclipsePluginSrcGen != null) {
|
||||
eclipsePluginSrcGen.initialize(injector);
|
||||
}
|
||||
if (eclipsePluginTestSrc != null) {
|
||||
eclipsePluginTestSrc.initialize(injector);
|
||||
}
|
||||
if (eclipsePluginTestSrcGen != null) {
|
||||
eclipsePluginTestSrcGen.initialize(injector);
|
||||
}
|
||||
if (ideaPluginSrc != null) {
|
||||
ideaPluginSrc.initialize(injector);
|
||||
}
|
||||
if (ideaPluginSrcGen != null) {
|
||||
ideaPluginSrcGen.initialize(injector);
|
||||
}
|
||||
if (ideaPluginTestSrc != null) {
|
||||
ideaPluginTestSrc.initialize(injector);
|
||||
}
|
||||
if (ideaPluginTestSrcGen != null) {
|
||||
ideaPluginTestSrcGen.initialize(injector);
|
||||
}
|
||||
if (webSrc != null) {
|
||||
webSrc.initialize(injector);
|
||||
}
|
||||
if (webSrcGen != null) {
|
||||
webSrcGen.initialize(injector);
|
||||
}
|
||||
if (webTestSrc != null) {
|
||||
webTestSrc.initialize(injector);
|
||||
}
|
||||
if (webTestSrcGen != null) {
|
||||
webTestSrcGen.initialize(injector);
|
||||
}
|
||||
if (orionJsGen != null) {
|
||||
orionJsGen.initialize(injector);
|
||||
}
|
||||
if (aceJsGen != null) {
|
||||
aceJsGen.initialize(injector);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getRuntimeSrc() {
|
||||
if (runtimeSrcPath != null)
|
||||
return new FileSystemAccess(runtimeSrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return runtimeSrc;
|
||||
}
|
||||
|
||||
public void setRuntimeSrc(String path) {
|
||||
this.runtimeSrcPath = path;
|
||||
this.runtimeSrc = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getRuntimeSrcGen() {
|
||||
if (runtimeSrcGenPath != null)
|
||||
return new FileSystemAccess(runtimeSrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return runtimeSrcGen;
|
||||
}
|
||||
|
||||
public void setRuntimeSrcGen(String path) {
|
||||
this.runtimeSrcGenPath = path;
|
||||
this.runtimeSrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess getRuntimeManifest() {
|
||||
return runtimeManifestAccess;
|
||||
return runtimeManifest;
|
||||
}
|
||||
|
||||
public void setRuntimeManifest(ManifestAccess manifest) {
|
||||
this.runtimeManifestAccess = manifest;
|
||||
this.runtimeManifest = manifest;
|
||||
}
|
||||
|
||||
public void setRuntimePluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.runtimePluginXmlAccess = new TextFileAccess();
|
||||
this.runtimePluginXmlAccess.setPath(path);
|
||||
this.runtimePluginXml = new TextFileAccess();
|
||||
this.runtimePluginXml.setPath(path);
|
||||
} else {
|
||||
this.runtimePluginXmlAccess = null;
|
||||
this.runtimePluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess getRuntimePluginXml() {
|
||||
return this.runtimePluginXmlAccess;
|
||||
return this.runtimePluginXml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getRuntimeTestSrc() {
|
||||
if (runtimeTestSrcPath != null)
|
||||
return new FileSystemAccess(runtimeTestSrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return runtimeTestSrc;
|
||||
}
|
||||
|
||||
public void setRuntimeTestSrc(String path) {
|
||||
this.runtimeTestSrcPath = path;
|
||||
this.runtimeTestSrc = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getRuntimeTestSrcGen() {
|
||||
if (runtimeTestSrcGenPath != null)
|
||||
return new FileSystemAccess(runtimeTestSrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return runtimeTestSrcGen;
|
||||
}
|
||||
|
||||
public void setRuntimeTestSrcGen(String path) {
|
||||
this.runtimeTestSrcGenPath = path;
|
||||
this.runtimeTestSrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess getRuntimeTestManifest() {
|
||||
return runtimeTestManifestAccess;
|
||||
return runtimeTestManifest;
|
||||
}
|
||||
|
||||
public void setRuntimeTestManifest(ManifestAccess manifest) {
|
||||
this.runtimeTestManifestAccess = manifest;
|
||||
this.runtimeTestManifest = manifest;
|
||||
}
|
||||
|
||||
public void setRuntimeTestPluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.runtimeTestPluginXmlAccess = new TextFileAccess();
|
||||
this.runtimeTestPluginXmlAccess.setPath(path);
|
||||
this.runtimeTestPluginXml = new TextFileAccess();
|
||||
this.runtimeTestPluginXml.setPath(path);
|
||||
} else {
|
||||
this.runtimeTestPluginXmlAccess = null;
|
||||
this.runtimeTestPluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess getRuntimeTestPluginXml() {
|
||||
return this.runtimeTestPluginXmlAccess;
|
||||
return this.runtimeTestPluginXml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getGenericIdeSrc() {
|
||||
if (genericIdeSrcPath != null)
|
||||
return new FileSystemAccess(genericIdeSrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return genericIdeSrc;
|
||||
}
|
||||
|
||||
public void setGenericIdeSrc(String path) {
|
||||
this.genericIdeSrcPath = path;
|
||||
this.genericIdeSrc = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getGenericIdeSrcGen() {
|
||||
if (genericIdeSrcGenPath != null)
|
||||
return new FileSystemAccess(genericIdeSrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return genericIdeSrcGen;
|
||||
}
|
||||
|
||||
public void setGenericIdeSrcGen(String path) {
|
||||
this.genericIdeSrcGenPath = path;
|
||||
this.genericIdeSrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess getGenericIdeManifest() {
|
||||
return genericIdeManifestAccess;
|
||||
return genericIdeManifest;
|
||||
}
|
||||
|
||||
public void setGenericIdeManifest(ManifestAccess manifest) {
|
||||
this.genericIdeManifestAccess = manifest;
|
||||
this.genericIdeManifest = manifest;
|
||||
}
|
||||
|
||||
public void setGenericIdePluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.genericIdePluginXmlAccess = new TextFileAccess();
|
||||
this.genericIdePluginXmlAccess.setPath(path);
|
||||
this.genericIdePluginXml = new TextFileAccess();
|
||||
this.genericIdePluginXml.setPath(path);
|
||||
} else {
|
||||
this.genericIdePluginXmlAccess = null;
|
||||
this.genericIdePluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess getGenericIdePluginXml() {
|
||||
return this.genericIdePluginXmlAccess;
|
||||
return this.genericIdePluginXml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getGenericIdeTestSrc() {
|
||||
if (genericIdeTestSrcPath != null)
|
||||
return new FileSystemAccess(genericIdeTestSrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return genericIdeTestSrc;
|
||||
}
|
||||
|
||||
public void setGenericIdeTestSrc(String path) {
|
||||
this.genericIdeTestSrcPath = path;
|
||||
this.genericIdeTestSrc = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getGenericIdeTestSrcGen() {
|
||||
if (genericIdeTestSrcGenPath != null)
|
||||
return new FileSystemAccess(genericIdeTestSrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return genericIdeTestSrcGen;
|
||||
}
|
||||
|
||||
public void setGenericIdeTestSrcGen(String path) {
|
||||
this.genericIdeTestSrcGenPath = path;
|
||||
this.genericIdeTestSrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess getGenericIdeTestManifest() {
|
||||
return genericIdeTestManifestAccess;
|
||||
return genericIdeTestManifest;
|
||||
}
|
||||
|
||||
public void setGenericIdeTestManifest(ManifestAccess manifest) {
|
||||
this.genericIdeTestManifestAccess = manifest;
|
||||
this.genericIdeTestManifest = manifest;
|
||||
}
|
||||
|
||||
public void setGenericIdeTestPluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.genericIdeTestPluginXmlAccess = new TextFileAccess();
|
||||
this.genericIdeTestPluginXmlAccess.setPath(path);
|
||||
this.genericIdeTestPluginXml = new TextFileAccess();
|
||||
this.genericIdeTestPluginXml.setPath(path);
|
||||
} else {
|
||||
this.genericIdeTestPluginXmlAccess = null;
|
||||
this.genericIdeTestPluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess getGenericIdeTestPluginXml() {
|
||||
return this.genericIdeTestPluginXmlAccess;
|
||||
return this.genericIdeTestPluginXml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getEclipsePluginSrc() {
|
||||
if (eclipsePluginSrcPath != null)
|
||||
return new FileSystemAccess(eclipsePluginSrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return eclipsePluginSrc;
|
||||
}
|
||||
|
||||
public void setEclipsePluginSrc(String path) {
|
||||
this.eclipsePluginSrcPath = path;
|
||||
this.eclipsePluginSrc = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getEclipsePluginSrcGen() {
|
||||
if (eclipsePluginSrcGenPath != null)
|
||||
return new FileSystemAccess(eclipsePluginSrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return eclipsePluginSrcGen;
|
||||
}
|
||||
|
||||
public void setEclipsePluginSrcGen(String path) {
|
||||
this.eclipsePluginSrcGenPath = path;
|
||||
this.eclipsePluginSrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess getEclipsePluginManifest() {
|
||||
return eclipsePluginManifestAccess;
|
||||
return eclipsePluginManifest;
|
||||
}
|
||||
|
||||
public void setEclipsePluginManifest(ManifestAccess manifest) {
|
||||
this.eclipsePluginManifestAccess = manifest;
|
||||
this.eclipsePluginManifest = manifest;
|
||||
}
|
||||
|
||||
public void setEclipsePluginPluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.eclipsePluginPluginXmlAccess = new TextFileAccess();
|
||||
this.eclipsePluginPluginXmlAccess.setPath(path);
|
||||
this.eclipsePluginPluginXml = new TextFileAccess();
|
||||
this.eclipsePluginPluginXml.setPath(path);
|
||||
} else {
|
||||
this.eclipsePluginPluginXmlAccess = null;
|
||||
this.eclipsePluginPluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess getEclipsePluginPluginXml() {
|
||||
return this.eclipsePluginPluginXmlAccess;
|
||||
return this.eclipsePluginPluginXml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getEclipsePluginTestSrc() {
|
||||
if (eclipsePluginTestSrcPath != null)
|
||||
return new FileSystemAccess(eclipsePluginTestSrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return eclipsePluginTestSrc;
|
||||
}
|
||||
|
||||
public void setEclipsePluginTestSrc(String path) {
|
||||
this.eclipsePluginTestSrcPath = path;
|
||||
this.eclipsePluginTestSrc = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getEclipsePluginTestSrcGen() {
|
||||
if (eclipsePluginTestSrcGenPath != null)
|
||||
return new FileSystemAccess(eclipsePluginTestSrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return eclipsePluginTestSrcGen;
|
||||
}
|
||||
|
||||
public void setEclipsePluginTestSrcGen(String path) {
|
||||
this.eclipsePluginTestSrcGenPath = path;
|
||||
this.eclipsePluginTestSrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess getEclipsePluginTestManifest() {
|
||||
return eclipsePluginTestManifestAccess;
|
||||
return eclipsePluginTestManifest;
|
||||
}
|
||||
|
||||
public void setEclipsePluginTestManifest(ManifestAccess manifest) {
|
||||
this.eclipsePluginTestManifestAccess = manifest;
|
||||
this.eclipsePluginTestManifest = manifest;
|
||||
}
|
||||
|
||||
public void setEclipsePluginTestPluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.eclipsePluginTestPluginXmlAccess = new TextFileAccess();
|
||||
this.eclipsePluginTestPluginXmlAccess.setPath(path);
|
||||
this.eclipsePluginTestPluginXml = new TextFileAccess();
|
||||
this.eclipsePluginTestPluginXml.setPath(path);
|
||||
} else {
|
||||
this.eclipsePluginTestPluginXmlAccess = null;
|
||||
this.eclipsePluginTestPluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess getEclipsePluginTestPluginXml() {
|
||||
return this.eclipsePluginTestPluginXmlAccess;
|
||||
return this.eclipsePluginTestPluginXml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getIdeaPluginSrc() {
|
||||
if (ideaPluginSrcPath != null)
|
||||
return new FileSystemAccess(ideaPluginSrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return ideaPluginSrc;
|
||||
}
|
||||
|
||||
public void setIdeaPluginSrc(String path) {
|
||||
this.ideaPluginSrcPath = path;
|
||||
this.ideaPluginSrc = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getIdeaPluginSrcGen() {
|
||||
if (ideaPluginSrcGenPath != null)
|
||||
return new FileSystemAccess(ideaPluginSrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return ideaPluginSrcGen;
|
||||
}
|
||||
|
||||
public void setIdeaPluginSrcGen(String path) {
|
||||
this.ideaPluginSrcGenPath = path;
|
||||
this.ideaPluginSrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess getIdeaPluginManifest() {
|
||||
return ideaPluginManifestAccess;
|
||||
return ideaPluginManifest;
|
||||
}
|
||||
|
||||
public void setIdeaPluginManifest(ManifestAccess manifest) {
|
||||
this.ideaPluginManifestAccess = manifest;
|
||||
this.ideaPluginManifest = manifest;
|
||||
}
|
||||
|
||||
public void setIdeaPluginPluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.ideaPluginPluginXmlAccess = new TextFileAccess();
|
||||
this.ideaPluginPluginXmlAccess.setPath(path);
|
||||
this.ideaPluginPluginXml = new TextFileAccess();
|
||||
this.ideaPluginPluginXml.setPath(path);
|
||||
} else {
|
||||
this.ideaPluginPluginXmlAccess = null;
|
||||
this.ideaPluginPluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess getIdeaPluginPluginXml() {
|
||||
return this.ideaPluginPluginXmlAccess;
|
||||
return this.ideaPluginPluginXml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getIdeaPluginTestSrc() {
|
||||
if (ideaPluginTestSrcPath != null)
|
||||
return new FileSystemAccess(ideaPluginTestSrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return ideaPluginTestSrc;
|
||||
}
|
||||
|
||||
public void setIdeaPluginTestSrc(String path) {
|
||||
this.ideaPluginTestSrcPath = path;
|
||||
this.ideaPluginTestSrc = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getIdeaPluginTestSrcGen() {
|
||||
if (ideaPluginTestSrcGenPath != null)
|
||||
return new FileSystemAccess(ideaPluginTestSrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return ideaPluginTestSrcGen;
|
||||
}
|
||||
|
||||
public void setIdeaPluginTestSrcGen(String path) {
|
||||
this.ideaPluginTestSrcGenPath = path;
|
||||
this.ideaPluginTestSrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess getIdeaPluginTestManifest() {
|
||||
return ideaPluginTestManifestAccess;
|
||||
return ideaPluginTestManifest;
|
||||
}
|
||||
|
||||
public void setIdeaPluginTestManifest(ManifestAccess manifest) {
|
||||
this.ideaPluginTestManifestAccess = manifest;
|
||||
this.ideaPluginTestManifest = manifest;
|
||||
}
|
||||
|
||||
public void setIdeaPluginTestPluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.ideaPluginTestPluginXmlAccess = new TextFileAccess();
|
||||
this.ideaPluginTestPluginXmlAccess.setPath(path);
|
||||
this.ideaPluginTestPluginXml = new TextFileAccess();
|
||||
this.ideaPluginTestPluginXml.setPath(path);
|
||||
} else {
|
||||
this.ideaPluginTestPluginXmlAccess = null;
|
||||
this.ideaPluginTestPluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess getIdeaPluginTestPluginXml() {
|
||||
return this.ideaPluginTestPluginXmlAccess;
|
||||
return this.ideaPluginTestPluginXml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getWebSrc() {
|
||||
if (webSrcPath != null)
|
||||
return new FileSystemAccess(webSrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return webSrc;
|
||||
}
|
||||
|
||||
public void setWebSrc(String path) {
|
||||
this.webSrcPath = path;
|
||||
this.webSrc = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getWebSrcGen() {
|
||||
if (webSrcGenPath != null)
|
||||
return new FileSystemAccess(webSrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return webSrcGen;
|
||||
}
|
||||
|
||||
public void setWebSrcGen(String path) {
|
||||
this.webSrcGenPath = path;
|
||||
this.webSrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess getWebManifest() {
|
||||
return webManifestAccess;
|
||||
return webManifest;
|
||||
}
|
||||
|
||||
public void setWebManifest(ManifestAccess manifest) {
|
||||
this.webManifestAccess = manifest;
|
||||
this.webManifest = manifest;
|
||||
}
|
||||
|
||||
public void setWebPluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.webPluginXmlAccess = new TextFileAccess();
|
||||
this.webPluginXmlAccess.setPath(path);
|
||||
this.webPluginXml = new TextFileAccess();
|
||||
this.webPluginXml.setPath(path);
|
||||
} else {
|
||||
this.webPluginXmlAccess = null;
|
||||
this.webPluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess getWebPluginXml() {
|
||||
return this.webPluginXmlAccess;
|
||||
return this.webPluginXml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getWebTestSrc() {
|
||||
if (webTestSrcPath != null)
|
||||
return new FileSystemAccess(webTestSrcPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return webTestSrc;
|
||||
}
|
||||
|
||||
public void setWebTestSrc(String path) {
|
||||
this.webTestSrcPath = path;
|
||||
this.webTestSrc = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getWebTestSrcGen() {
|
||||
if (webTestSrcGenPath != null)
|
||||
return new FileSystemAccess(webTestSrcGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return webTestSrcGen;
|
||||
}
|
||||
|
||||
public void setWebTestSrcGen(String path) {
|
||||
this.webTestSrcGenPath = path;
|
||||
this.webTestSrcGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManifestAccess getWebTestManifest() {
|
||||
return webTestManifestAccess;
|
||||
return webTestManifest;
|
||||
}
|
||||
|
||||
public void setWebTestManifest(ManifestAccess manifest) {
|
||||
this.webTestManifestAccess = manifest;
|
||||
this.webTestManifest = manifest;
|
||||
}
|
||||
|
||||
public void setWebTestPluginXml(String path) {
|
||||
if (path != null) {
|
||||
this.webTestPluginXmlAccess = new TextFileAccess();
|
||||
this.webTestPluginXmlAccess.setPath(path);
|
||||
this.webTestPluginXml = new TextFileAccess();
|
||||
this.webTestPluginXml.setPath(path);
|
||||
} else {
|
||||
this.webTestPluginXmlAccess = null;
|
||||
this.webTestPluginXml = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFileAccess getWebTestPluginXml() {
|
||||
return this.webTestPluginXmlAccess;
|
||||
return this.webTestPluginXml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getOrionJsGen() {
|
||||
if (orionJsGenPath != null)
|
||||
return new FileSystemAccess(orionJsGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return orionJsGen;
|
||||
}
|
||||
|
||||
public void setOrionJsGen(String path) {
|
||||
this.orionJsGenPath = path;
|
||||
this.orionJsGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFileSystemAccess2 getAceJsGen() {
|
||||
if (aceJsGenPath != null)
|
||||
return new FileSystemAccess(aceJsGenPath, encodingProvider);
|
||||
else
|
||||
return null;
|
||||
return aceJsGen;
|
||||
}
|
||||
|
||||
public void setAceJsGen(String path) {
|
||||
this.aceJsGenPath = path;
|
||||
this.aceJsGen = new FileSystemAccess(path);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue