diff --git a/AlgebraicDataflowArchitectureModel/src/application/actions/JavaPrototypeGenerateAction.java b/AlgebraicDataflowArchitectureModel/src/application/actions/JavaPrototypeGenerateAction.java index 754c104..a56f615 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/actions/JavaPrototypeGenerateAction.java +++ b/AlgebraicDataflowArchitectureModel/src/application/actions/JavaPrototypeGenerateAction.java @@ -14,6 +14,8 @@ import application.editor.Editor; import code.ast.*; import generators.CodeGenerator; +import generators.CodeGeneratorFromControlFlowGraph; +import generators.CodeGeneratorFromDataFlowGraph; import generators.DataTransferMethodAnalyzer; import generators.JavaCodeGenerator; import generators.JavaMethodBodyGenerator; @@ -65,9 +67,9 @@ } ControlFlowGraph controlFlowGraph = editor.getControlFlowGraph(); if (controlFlowGraph != null) { - editor.setCodes(CodeGenerator.generateCode(model, controlFlowGraph, new JavaSpecific())); + editor.setCodes(new CodeGeneratorFromControlFlowGraph().generateCode(model, controlFlowGraph, new JavaSpecific())); } else { - editor.setCodes(CodeGenerator.generateCode(model, dataFlowgraph, new JavaSpecific())); + editor.setCodes(new CodeGeneratorFromDataFlowGraph().generateCode(model, dataFlowgraph, new JavaSpecific())); } ModelExtension.recoverModel(model); for (CompilationUnit file : editor.getCodes()) {