Skip to content
Snippets Groups Projects
Commit f2f6039d authored by buehlera's avatar buehlera
Browse files

Leere Felder im GlueBlock abgefangen

parent 19b10cb3
Branches
No related tags found
No related merge requests found
...@@ -28,17 +28,26 @@ public class GlueBlock extends TranslatorBlock ...@@ -28,17 +28,26 @@ public class GlueBlock extends TranslatorBlock
if(tB1 != null){ if(tB1 != null){
ret = tB1.toCode().replaceAll("\\s*_.new\\b\\s*", "") + VarMarker; ret = tB1.toCode().replaceAll("\\s*_.new\\b\\s*", "") + VarMarker;
} }
if(tB2 != null){
ret += tB2.toCode().replaceAll("\\s*_.new\\b\\s*", "");
}
return ret + tB2.toCode().replaceAll("\\s*_.new\\b\\s*", "") + " "; return ret + " ";
} }
public SimCode toSim() throws BlockException, SocketNullException { public SimCode toSim() throws BlockException, SocketNullException {
TranslatorBlock tB2 = this.getTranslatorBlockAtSocket(1); TranslatorBlock tB2 = this.getTranslatorBlockAtSocket(1);
TranslatorBlock tB1 = this.getTranslatorBlockAtSocket(0); TranslatorBlock tB1 = this.getTranslatorBlockAtSocket(0);
SimCode tB1Sim = null;
SimCode tB2Sim = null;
if(tB1 != null) { if(tB1 != null) {
return new CodeConnectString(tB1.toSim(),tB2.toSim()); tB1Sim = tB1.toSim();
}
if(tB2 != null){
tB2Sim = tB2.toSim();
} }
return new CodeConnectString(null,tB2.toSim()); return new CodeConnectString(tB1Sim,tB2Sim);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment