}
public GenerationItem[] generate(CompileContext context, GenerationItem[] items, VirtualFile outputRootDirectory) {
if (JFlex.isCompilationEnabled()) {
if (items != null && items.length > 0) {
Application application = ApplicationManager.getApplication();
GenerationItem[] generationItems = application.runReadAction(new GenerateAction(context, items, outputRootDirectory, ProjectRootManager.getInstance(context.getProject()).getProjectSdk()));
for (GenerationItem item : generationItems) {
CompilerUtil.refreshIOFile(((JFlexGenerationItem) item).getGeneratedFile());
}
return generationItems;
}