I created a plugin which generates Enum files based on database tables using the method:
public List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles( IntrospectedTable introspectedTable )
This plugin works perfectly for generating the Enums. However, when the Enums already exist and the eclipse generator tries to merge these files, I'm getting the error "No types defined in the file".
The error is coming from JavaFileMerger.getMergedSource(). It seems visitor.getTypeDeclaration() is returning null if it is an Enum. If I change these to be regular java classes, I don't get this error.