public GeneratorBase createGenerator(GenDiagram diagram) { final GenEditorGenerator editorGen = diagram.getEditorGen(); // using caching EmitterSource saves few seconds on test execution (115-118 compared to 112) // but it seems reasonable to avoid unpredictability of reuse (due to use of soft references) // and might be good idea to have separate test to test emitter reuse explicitly return new Generator( editorGen, new CodegenEmitters( !editorGen.isDynamicTemplates(), editorGen.getTemplateDirectory(), editorGen.getModelAccess() != null)); }