Aufgrund einer Störung des s3 Storage, könnten in nächster Zeit folgende GitLab Funktionen nicht zur Verfügung stehen: LFS, Container Registry, Job Artifacs, Uploads (Wiki, Bilder, Projekt-Exporte). Wir bitten um Verständnis. Es wird mit Hochdruck an der Behebung des Problems gearbeitet. Weitere Informationen zur Störung des Object Storage finden Sie hier: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/59-object-storage-pilot

Commit d665c72f authored by Georg Vinogradov's avatar Georg Vinogradov
Browse files

Small name adjustments

parent 2c24c072
Pipeline #158265 passed with stages
in 3 minutes and 25 seconds
......@@ -20,15 +20,10 @@ public class GeneratorMqtt
List<File> files = new ArrayList<>();
List<String> contents = new ArrayList<String>();
List<FileWriter> frs = new ArrayList<FileWriter>();
// Get info about the ports from the component
Collection<EMAPortInstanceSymbol> ports = component.getPortInstanceList();
// Create and fill model
MqttAdapterModel model = new MqttAdapterModel(component.getFullName());
model.addPorts(ports);
//Generate files and write to project
contents.add(MqttTemplates.generateMqttAdapterH(model));
files.add(new File("./target/generated-sources/MqttAdapter_"+model.getEscapedCompName()+".h"));
......@@ -103,7 +98,7 @@ public class GeneratorMqtt
// Create and fill model
MqttAdapterModel model = new MqttAdapterModel(component.getFullName());
model.addPorts(ports);
model.addPortsDesc(ports);
//Generate files and write to project
String content = MqttTemplates.generatePrettyPrint(model);
......
......@@ -33,7 +33,7 @@ public class MqttAdapterModel {
}
// Parse through component to find information about its ports
public void addPorts(Collection<EMAPortInstanceSymbol> ports)
public void addPortsDesc(Collection<EMAPortInstanceSymbol> ports)
{
for (EMAPortInstanceSymbol port : ports)
{
......@@ -51,7 +51,7 @@ public class MqttAdapterModel {
}
}
public List<String> getPorts()
public List<String> getPortsDesc()
{
return this.ports;
}
......
......@@ -14,7 +14,7 @@ import de.se_rwth.commons.logging.Log;
public class MqttTemplates {
private static final Template PrettyPrint;
private static final Template MQTT_PRETTYPRINT;
private static final Template MQTT_CMAKELISTS;
private static final Template MQTT_ADAPTER_H;
private static final Template MQTT_ADAPTER_CPP;
......@@ -29,7 +29,7 @@ public class MqttTemplates {
conf.setLogTemplateExceptions(false);
conf.setClassForTemplateLoading(MqttTemplates.class, "");
try {
PrettyPrint = conf.getTemplate("PrettyPrint.ftl");
MQTT_PRETTYPRINT = conf.getTemplate("PrettyPrint.ftl");
MQTT_CMAKELISTS = conf.getTemplate("CMakeLists.ftl");
MQTT_ADAPTER_H = conf.getTemplate("Adapter.h.ftl");
MQTT_ADAPTER_CPP = conf.getTemplate("Adapter.cpp.ftl");
......@@ -75,7 +75,7 @@ public class MqttTemplates {
public static String generatePrettyPrint(MqttAdapterModel model) {
HashMap<String, Object> data = new HashMap<>();
data.put("model", model);
return generate(PrettyPrint, data);
return generate(MQTT_PRETTYPRINT, data);
}
@SuppressWarnings("rawtypes")
......
......@@ -4,6 +4,6 @@ Component name: ${model.getCompName()}
Ports:
<#list model.getPorts() as gen>
<#list model.getPortsDesc() as gen>
${gen}
</#list>
\ No newline at end of file
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