use of net.sf.jasperreports.engine.design.JRCompilationSourceCode in project opennms by OpenNMS.
the class CustomJRJdtCompiler method recreateCompileUnit.
protected JRCompilationUnit recreateCompileUnit(JRCompilationUnit compilationUnit, Set<Method> missingMethods) {
String unitName = compilationUnit.getName();
JRSourceCompileTask sourceTask = compilationUnit.getCompileTask();
JRCompilationSourceCode sourceCode = JRClassGenerator.modifySource(sourceTask, missingMethods, compilationUnit.getSourceCode());
File sourceFile = compilationUnit.getSourceFile();
File saveSourceDir = sourceFile == null ? null : sourceFile.getParentFile();
sourceFile = getSourceFile(saveSourceDir, unitName, sourceCode);
return new JRCompilationUnit(unitName, sourceCode, sourceFile, compilationUnit.getExpressions(), sourceTask);
}
Aggregations