Commit a9971a3b authored by Vincent Horváth's avatar Vincent Horváth

fixed generator for frontend

parent 247ff89c
......@@ -76,6 +76,7 @@ public class LanguageBuilder extends BaseBuilder {
FrontendInterface frontendInterpreter = generator.getFrontendInterpreter();
frontendInterpreter.setEntities(entities);
generator.generateFrontend();
for (String path : frontendInterpreter.getWatchBfiViewPaths()) {
for (File file : fileHelper.finderByExtension(path, EXTENSIONS_SEPARATOR + FRONTEND_FILE_EXTENSIONS)) {
......
......@@ -60,6 +60,7 @@ public class GeneratorImpl implements sk.tuke.bfi.core.generator.Generator {
@Override
public void generateBackend() {
LOGGER.info("Start generation for backend.");
int countEntities = 0;
for (Map.Entry<String, BaseEntity> entityEntry : backendInterpreter.getEntities().entrySet()) {
backendInterpreter.setEntity(entityEntry.getValue());
......@@ -75,7 +76,7 @@ public class GeneratorImpl implements sk.tuke.bfi.core.generator.Generator {
private void generateBackendOneToOne(BaseInterface interpreter) {
final BaseEntity entity = interpreter.getEntity();
LOGGER.debug("Starting generate for entity " + entity);
LOGGER.debug("Start generation for entity " + entity);
this.projectRoot = interpreter.getProjectRoot();
final List<Class<?>> classes = getAnnotationClasses(Generator.class, interpreter.getClass().getPackage());
......@@ -135,13 +136,18 @@ public class GeneratorImpl implements sk.tuke.bfi.core.generator.Generator {
}
public void generateFrontend() {
LOGGER.debug("Starting generate for frontend " + frontendInterpreter.getFile().getName());
LOGGER.info("Start generation for frontend.");
for (Map.Entry<String, BaseEntity> entityEntry : frontendInterpreter.getEntities().entrySet()) {
frontendInterpreter.setEntity(entityEntry.getValue());
frontendInterpreter.beforeGenerate();
if( frontendInterpreter.getFile() !=null){
frontendInterpreter.beforeGenerate();
}
generateBackendOneToOne(frontendInterpreter);
}
if( frontendInterpreter.getFile() ==null){
return;
}
frontendInterpreter.beforeGenerate();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment