fixed generated annotation

parent 5f2da80a
......@@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.resource.Resource
import org.eclipse.xtext.generator.AbstractGenerator
import org.eclipse.xtext.generator.IFileSystemAccess2
import org.eclipse.xtext.generator.IGeneratorContext
import java.util.Date
/**
* Generates code from your model files on save.
......@@ -62,7 +63,7 @@ class ConfigGenerator extends AbstractGenerator {
«c.compileImports»
@Generated
«generateGeneratedAnnotation»
public class «c.type» extends Configuration {
«c.compileAttributes»
......@@ -77,6 +78,10 @@ class ConfigGenerator extends AbstractGenerator {
«c.compileActiveDeclarations»
}
}'''
def generateGeneratedAnnotation() '''
@Generated(value = "TeeTime Plug-In", date = "«new Date(System.currentTimeMillis).toString»")
'''
def compileHeader() '''
/**********************************************
......@@ -108,6 +113,7 @@ class ConfigGenerator extends AbstractGenerator {
// to allow each import only once, first collect all imports in a hashset
var importSet = new HashSet<String>();
// add superclass
importSet.add("javax.annotation.Generated");
importSet.add("teetime.framework.Configuration");
// add imports from constructor params
if (c.argumentList != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment