|
|
|
@ -217,7 +217,7 @@ public class FlowBlock { |
|
|
|
|
elseBlock.outer instanceof SequentialBlock && |
|
|
|
|
elseBlock.outer.getSubBlocks()[0] instanceof IfThenElseBlock && |
|
|
|
|
(elseBlock.outer.getNextFlowBlock() == successor || |
|
|
|
|
elseBlock.outer.jumpMayBeChanged()) { |
|
|
|
|
elseBlock.outer.jumpMayBeChanged())) { |
|
|
|
|
IfThenElseBlock ifBlock = |
|
|
|
|
(IfThenElseBlock)elseBlock.outer.getSubBlocks()[0]; |
|
|
|
|
if (ifBlock.getElseBlock() == null) { |
|
|
|
@ -228,7 +228,7 @@ public class FlowBlock { |
|
|
|
|
} else { |
|
|
|
|
jump.parent.removeJump(); |
|
|
|
|
} |
|
|
|
|
ifBlock.replace(elseBlock.outer) |
|
|
|
|
ifBlock.replace(elseBlock.outer); |
|
|
|
|
ifBlock.setElseBlock(elseBlock); |
|
|
|
|
if (appendBlock = elseBlock.outer) |
|
|
|
|
appendBlock = ifBlock; |
|
|
|
@ -447,6 +447,13 @@ public class FlowBlock { |
|
|
|
|
* to the do/while block. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
/* Merge the sucessors from the successing flow block |
|
|
|
|
*/ |
|
|
|
|
enum = succ.successors.elements(); |
|
|
|
|
while (enum.hasMoreElements()) { |
|
|
|
|
successors.addElement(enum.nextElement()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Believe it or not: Now the rule, that the first part of a |
|
|
|
|
* SequentialBlock shouldn't be another SequentialBlock is |
|
|
|
|
* fulfilled. <p> |
|
|
|
@ -501,7 +508,3 @@ public class FlowBlock { |
|
|
|
|
successors.setElementAt(null, successors.indexOf(jump)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|