Commit 5e7ffba8 authored by Evgeny Kusmenko's avatar Evgeny Kusmenko

Merge branch 'odv-option' into 'master'

Added odv option as empty dummy

See merge request !14
parents 48b98881 c24b987c
Pipeline #68736 passed with stages
in 9 minutes and 39 seconds
......@@ -3,6 +3,7 @@ package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosToEmamTagSchema;
import de.monticore.lang.monticar.generator.middleware.impls.CPPGenImpl;
import de.monticore.lang.monticar.generator.middleware.impls.ODVGenImpl;
import de.monticore.lang.monticar.generator.middleware.impls.RosCppGenImpl;
import de.monticore.lang.monticar.generator.order.simulator.AbstractSymtab;
import de.monticore.lang.monticar.generator.roscpp.helper.TagHelper;
......@@ -60,6 +61,7 @@ public final class DistributedTargetGeneratorCli {
public static final String GENERATOR_CPP = "cpp";
public static final String GENERATOR_ROSCPP = "roscpp";
public static final String GENERATOR_ODV = "odv";
private DistributedTargetGeneratorCli() {}
......@@ -87,6 +89,7 @@ public final class DistributedTargetGeneratorCli {
HashSet<String> res = new HashSet<>();
res.add(GENERATOR_CPP);
res.add(GENERATOR_ROSCPP);
res.add(GENERATOR_ODV);
return res;
}
......@@ -142,6 +145,10 @@ public final class DistributedTargetGeneratorCli {
TagHelper.resolveTags(taggingResolver, componentInstanceSymbol);
}
if (generators.contains(GENERATOR_ODV)) {
generator.add(new ODVGenImpl(), "odv");
}
try {
generator.generate(componentInstanceSymbol, taggingResolver);
} catch (IOException e) {
......
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
import de.se_rwth.commons.logging.Log;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class ODVGenImpl implements GeneratorImpl {
private String generationTargetPath;
@Override
public List<File> generate(ExpandedComponentInstanceSymbol componentInstanceSymbol, TaggingResolver taggingResolver) throws IOException {
//TODO: implement ODV generator in new Project(e.g. EMAM2ODV)
Log.warn("ODV is not yet implemented!");
return new ArrayList<>();
}
@Override
public void setGenerationTargetPath(String path) {
this.generationTargetPath = path;
}
@Override
public boolean willAccept(ExpandedComponentInstanceSymbol componentInstanceSymbol) {
//TODO: check if component has ODV Ports
return true;
}
}
......@@ -17,7 +17,7 @@ public class CliTest{
private static final String VALID_MODELS_DIR_OPTION = "--models-dir=src/test/resources/";
private static final String VALID_ROOT_MODEL_OPTION = "--root-model=tests.a.addComp";
private static final String VALID_GENERATOR_CPP_OPTION = "--generators=cpp";
private static final String VALID_GENERATOR_ALL_OPTION = "--generators=cpp,roscpp";
private static final String VALID_GENERATOR_ALL_OPTION = "--generators=cpp,roscpp,odv";
private static final String INVALID_MODELS_DIR_OPTION = "--models-dir=src/invalid/resources/";
private static final String INVALID_ROOT_MODEL_OPTION = "--root-model=invalid.invalid.addComp";
......
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