use of org.mybatis.generator.eclipse.core.merge.InvalidExistingFileException in project generator by mybatis.
the class EclipseShellCallback method mergeJavaFile.
public String mergeJavaFile(String newFileSource, File existingFile, String[] javadocTags, String fileEncoding) throws ShellException {
String existingFileContent = getExistingFileContents(existingFile, fileEncoding);
JavaFileMerger merger = new JavaFileMerger(newFileSource, existingFileContent, javadocTags);
try {
return merger.getMergedSource();
} catch (InvalidExistingFileException e) {
throw translateInvalidExistingFileException(e, existingFile);
}
}
Aggregations