Loading plugins/org.etsi.mts.tdl.rt.ui/src/org/etsi/mts/tdl/tools/rt/renderers/TTCN3Renderer.java +8 −1 Original line number Diff line number Diff line Loading @@ -189,6 +189,7 @@ public class TTCN3Renderer { return output; } //TODO: handle true, false, pass, fail String render(SimpleDataInstance e, String indent) { String output = ""; output+=indent+"template "+ttcnName(e.getDataType())+" "+ttcnName(e)+" := \""+ttcnName(e)+"\";"+LF; Loading Loading @@ -561,13 +562,19 @@ public class TTCN3Renderer { String render(CompoundBehaviour e, String indent, ComponentInstance c) { String output = ""; String guard = ""; //TODO: multiple guards on the same component -> check specification and update if (!e.getBlock().getGuard().isEmpty()) { String block = ""; if (e.getBlock().getGuard().stream().anyMatch(g -> g.getComponentInstance() == c)) { block = render(e.getBlock(), indent+this.indent, c); } for (var g : e.getBlock().getGuard()) { if (g.getComponentInstance() == c) { guard+="if ("+render(g.getExpression(), "")+") "; output+=indent+guard+"{"+LF; output+=render(e.getBlock(), indent+this.indent, c); output+=block; output+=indent+"}"+LF; break;//TODO: Handle multiple? } } } else { Loading Loading
plugins/org.etsi.mts.tdl.rt.ui/src/org/etsi/mts/tdl/tools/rt/renderers/TTCN3Renderer.java +8 −1 Original line number Diff line number Diff line Loading @@ -189,6 +189,7 @@ public class TTCN3Renderer { return output; } //TODO: handle true, false, pass, fail String render(SimpleDataInstance e, String indent) { String output = ""; output+=indent+"template "+ttcnName(e.getDataType())+" "+ttcnName(e)+" := \""+ttcnName(e)+"\";"+LF; Loading Loading @@ -561,13 +562,19 @@ public class TTCN3Renderer { String render(CompoundBehaviour e, String indent, ComponentInstance c) { String output = ""; String guard = ""; //TODO: multiple guards on the same component -> check specification and update if (!e.getBlock().getGuard().isEmpty()) { String block = ""; if (e.getBlock().getGuard().stream().anyMatch(g -> g.getComponentInstance() == c)) { block = render(e.getBlock(), indent+this.indent, c); } for (var g : e.getBlock().getGuard()) { if (g.getComponentInstance() == c) { guard+="if ("+render(g.getExpression(), "")+") "; output+=indent+guard+"{"+LF; output+=render(e.getBlock(), indent+this.indent, c); output+=block; output+=indent+"}"+LF; break;//TODO: Handle multiple? } } } else { Loading