Commit 198a5f77 authored by Alexander David Hellwig's avatar Alexander David Hellwig
Browse files

Fix normalization for instance as component printing

parent 002d0785
Pipeline #180628 passed with stage
in 2 minutes and 25 seconds
......@@ -10,7 +10,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc</artifactId>
<version>0.1.15-SNAPSHOT</version>
<version>0.1.16-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
......
......@@ -284,7 +284,13 @@ public class SymbolPrinter {
ip.println("{");
ip.indent();
printPorts(instance.getPortInstanceList(), ip);
instance.getPortInstanceList()
.stream()
.map(p -> String.format("port %s %s %s;",
p.isIncoming() ? "in" : "out",
p.getTypeReference().getName(),
normalize(p.getName())))
.forEach(ip::println);
ip.println();
......@@ -300,7 +306,12 @@ public class SymbolPrinter {
ip.println();
instance.getConnectorInstances().forEach(con -> printConnector(con, ip));
instance.getConnectorInstances()
.stream()
.map(con -> String.format("connect %s -> %s;",
normalize(con.getSource()),
normalize(con.getTarget())))
.forEach(ip::println);
ip.unindent();
ip.println("}");
......
Supports Markdown
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