25. class MySpecialEcoreGen extends EcoreGen {
override dispatch generate(EAttribute attribute) '''
special EAttribute
'''
def dispatch generate(EParameter param) '''
parameter
'''
}
class CustomizedGenerator {
def static void main(String[] args) {
val injector = Guice::createInjector [
bind(typeof(EcoreGen)).to(typeof(MySpecialEcoreGen))
]
val mainGenerator = injector.getInstance(typeof(MainGenerator))
mainGenerator.doGenerate(EcorePackage::eINSTANCE.EClass)
}
}
Extend the class you want to modify
Use Guice to wire up the generator
26. content assist
syntax coloring
quick assist outline
rename refactoring
formating
call hierarchy
type hierarchy
extract method
debugging
etc...
IDE Support