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