<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#copied {background-color:#ccccff;}
tr.alt #copied {background-color:#bbbbf7;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="5">Commit in <b><tt>metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</tt></b></td></tr>
<tr><td><tt><a href="#file1">ASTASDoWhileStatement.java</a></tt> </td><td></td><td align="right" id="added">+2</td><td align="right" id="removed">-48</td><td nowrap="nowrap" align="center">406 -> 407</td></tr>
<tr class="alt"><td><tt><a href="#file2">ASTASForStatement.java</a></tt> </td><td></td><td align="right" id="added">+2</td><td align="right" id="removed">-48</td><td nowrap="nowrap" align="center">406 -> 407</td></tr>
<tr><td><tt><a href="#file3">ASTASIfStatement.java</a></tt> </td><td></td><td align="right" id="added">+2</td><td align="right" id="removed">-48</td><td nowrap="nowrap" align="center">406 -> 407</td></tr>
<tr class="alt"><td><tt><a href="#file4">ASTASSwitchCase.java</a></tt> </td><td></td><td align="right" id="added">+2</td><td align="right" id="removed">-48</td><td nowrap="nowrap" align="center">406 -> 407</td></tr>
<tr><td><tt><a href="#file5">ASTASSwitchDefault.java</a></tt> </td><td></td><td align="right" id="added">+2</td><td align="right" id="removed">-49</td><td nowrap="nowrap" align="center">406 -> 407</td></tr>
<tr class="alt"><td><tt><a href="#file6">ASTASWhileStatement.java</a></tt> </td><td></td><td align="right" id="added">+2</td><td align="right" id="removed">-49</td><td nowrap="nowrap" align="center">406 -> 407</td></tr>
<tr><td><tt><a href="#file7">ASTForInCommon.java</a></tt> </td><td></td><td align="right" id="added">+3</td><td align="right" id="removed">-50</td><td nowrap="nowrap" align="center">406 -> 407</td></tr>
<tr class="alt"><td><tt><a href="#file8"><span id="added">ContainerDelegate.java</span></a></tt> </td><td></td><td align="right" id="added">+56</td><td></td><td nowrap="nowrap" align="right">added 407</td></tr>
<tr><td></td><td></td><td align="right" id="added">+71</td><td align="right" id="removed">-340</td><td></td></tr>
</table>
<small id="info">1 added + 7 modified, total 8 files</small><br />
<pre class="comment">
extract some common code from implementors of StatementContainer
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</span><br />
<div class="fileheader"><big><b>ASTASDoWhileStatement.java</b></big> <small id="info">406 -> 407</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASDoWhileStatement.java        2007-02-11 20:00:17 UTC (rev 406)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASDoWhileStatement.java        2007-02-12 00:04:50 UTC (rev 407)
@@ -8,17 +8,11 @@
</small></pre><pre class="diff" id="context">
import org.asdt.core.internal.antlr.AS3Parser;
import uk.co.badgersinfoil.metaas.dom.ASDoWhileStatement;
</pre><pre class="diff" id="removed">-import uk.co.badgersinfoil.metaas.dom.ASForEachInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForStatement;
-import uk.co.badgersinfoil.metaas.dom.ASIfStatement;
-import uk.co.badgersinfoil.metaas.dom.ASSwitchStatement;
-import uk.co.badgersinfoil.metaas.dom.ASWhileStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.StatementContainer;
import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
</pre><pre class="diff" id="removed">-public class ASTASDoWhileStatement implements ASDoWhileStatement {
</pre><pre class="diff" id="added">+public class ASTASDoWhileStatement <span id="addedchars">extends ContainerDelegate </span>implements ASDoWhileStatement {
</pre><pre class="diff" id="context">
        private static final int INDEX_STATEMENT = 0;
        private static final int INDEX_CONDITION = 1;
</pre><pre class="diff"><small id="info">@@ -32,50 +26,10 @@
</small></pre><pre class="diff" id="context">         private LinkedListTree getChild(int index) {
                return (LinkedListTree)ast.getChild(index);
        }
</pre><pre class="diff" id="removed">-        private StatementContainer getBlock() {
</pre><pre class="diff" id="added">+        protected StatementContainer getStatementContainer() {
</pre><pre class="diff" id="context">                 return new ASTStatementList(getChild(INDEX_STATEMENT));
        }
</pre><pre class="diff" id="removed">-        public void addStmt(String statement) {
-                getBlock().addStmt(statement);
-        }
-
-        public void addComment(String text) {
-                getBlock().addComment(text);
-        }
-
-        public ASIfStatement newIf(String condition) {
-                return getBlock().newIf(condition);
-        }
-
-        public ASForStatement newFor(String init, String condition,        String update) {
-                return getBlock().newFor(init, condition, update);
-        }
-
-        public ASForInStatement newForIn(String init, String list) {
-                return getBlock().newForIn(init, list);
-        }
-
-        public ASForEachInStatement newForEachIn(String init, String list) {
-                return getBlock().newForEachIn(init, list);
-        }
-
-        public ASWhileStatement newWhile(String condition) {
-                return getBlock().newWhile(condition);
-        }
-
-        public ASDoWhileStatement newDoWhile(String condition) {
-                return getBlock().newDoWhile(condition);
-        }
-
-        public ASSwitchStatement newSwitch(String condition) {
-                return getBlock().newSwitch(condition);
-        }
-
-        public boolean containsCode() {
-                return getBlock().containsCode();
-        }
-
</pre><pre class="diff" id="context">         public String getConditionString() {
                return ASTUtils.stringifyNode(getChild(INDEX_CONDITION).getFirstChild());
        }
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</span><br />
<div class="fileheader"><big><b>ASTASForStatement.java</b></big> <small id="info">406 -> 407</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASForStatement.java        2007-02-11 20:00:17 UTC (rev 406)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASForStatement.java        2007-02-12 00:04:50 UTC (rev 407)
@@ -6,18 +6,12 @@
</small></pre><pre class="diff" id="context">
package uk.co.badgersinfoil.metaas.impl;
</pre><pre class="diff" id="removed">-import uk.co.badgersinfoil.metaas.dom.ASDoWhileStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForEachInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForInStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.ASForStatement;
</pre><pre class="diff" id="removed">-import uk.co.badgersinfoil.metaas.dom.ASIfStatement;
-import uk.co.badgersinfoil.metaas.dom.ASSwitchStatement;
-import uk.co.badgersinfoil.metaas.dom.ASWhileStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.StatementContainer;
import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
</pre><pre class="diff" id="removed">-public class ASTASForStatement implements ASForStatement {
</pre><pre class="diff" id="added">+public class ASTASForStatement <span id="addedchars">extends ContainerDelegate </span>implements ASForStatement {
</pre><pre class="diff" id="context">
        private static final int INDEX_INIT = 0;
        private static final int INDEX_CONDITION = 1;
</pre><pre class="diff"><small id="info">@@ -66,7 +60,7 @@
</small></pre><pre class="diff" id="context">                 return (LinkedListTree)ast.getChild(index);
        }
</pre><pre class="diff" id="removed">-        private StatementContainer getBlock() {
</pre><pre class="diff" id="added">+        protected StatementContainer getStatementContainer() {
</pre><pre class="diff" id="context">                 return new ASTStatementList(getChild(INDEX_STATEMENT));
        }
</pre><pre class="diff"><small id="info">@@ -82,46 +76,6 @@
</small></pre><pre class="diff" id="context">                 return getChild(INDEX_UPDATE);
        }
</pre><pre class="diff" id="removed">-        public void addStmt(String statement) {
-                getBlock().addStmt(statement);
-        }
-
-        public void addComment(String text) {
-                getBlock().addComment(text);
-        }
-
-        public ASIfStatement newIf(String condition) {
-                return getBlock().newIf(condition);
-        }
-
-        public ASForStatement newFor(String init, String condition, String update) {
-                return getBlock().newFor(init, condition, update);
-        }
-
-        public ASForInStatement newForIn(String init, String list) {
-                return getBlock().newForIn(init, list);
-        }
-
-        public ASForEachInStatement newForEachIn(String init, String list) {
-                return getBlock().newForEachIn(init, list);
-        }
-
-        public ASWhileStatement newWhile(String condition) {
-                return getBlock().newWhile(condition);
-        }
-
-        public ASDoWhileStatement newDoWhile(String condition) {
-                return getBlock().newDoWhile(condition);
-        }
-
-        public ASSwitchStatement newSwitch(String condition) {
-                return getBlock().newSwitch(condition);
-        }
-
-        public boolean containsCode() {
-                return getBlock().containsCode();
-        }
-
</pre><pre class="diff" id="context">         public void setCondition(String expr) {
                if (expr == null) {
                        deleteAnyChild(findCondition());
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</span><br />
<div class="fileheader"><big><b>ASTASIfStatement.java</b></big> <small id="info">406 -> 407</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASIfStatement.java        2007-02-11 20:00:17 UTC (rev 406)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASIfStatement.java        2007-02-12 00:04:50 UTC (rev 407)
@@ -8,18 +8,12 @@
</small></pre><pre class="diff" id="context">
import org.asdt.core.internal.antlr.AS3Parser;
import uk.co.badgersinfoil.metaas.dom.ASBlock;
</pre><pre class="diff" id="removed">-import uk.co.badgersinfoil.metaas.dom.ASDoWhileStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForEachInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.ASIfStatement;
</pre><pre class="diff" id="removed">-import uk.co.badgersinfoil.metaas.dom.ASSwitchStatement;
-import uk.co.badgersinfoil.metaas.dom.ASWhileStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.StatementContainer;
import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
</pre><pre class="diff" id="removed">-public class ASTASIfStatement implements ASIfStatement {
</pre><pre class="diff" id="added">+public class ASTASIfStatement <span id="addedchars">extends ContainerDelegate </span>implements ASIfStatement {
</pre><pre class="diff" id="context">
        private LinkedListTree ast;
</pre><pre class="diff"><small id="info">@@ -28,7 +22,7 @@
</small></pre><pre class="diff" id="context">                 this.ast = ast;
        }
</pre><pre class="diff" id="removed">-        private StatementContainer getThen() {
</pre><pre class="diff" id="added">+        protected StatementContainer getStatementContainer() {
</pre><pre class="diff" id="context">                 return new ASTStatementList((LinkedListTree)ast.getChild(1));
        }
</pre><pre class="diff"><small id="info">@@ -47,46 +41,6 @@
</small></pre><pre class="diff" id="context">                 return new ASTStatementList(elseStmt.getFirstChild());
        }
</pre><pre class="diff" id="removed">-        public void addStmt(String statement) {
-                getThen().addStmt(statement);
-        }
-
-        public void addComment(String text) {
-                getThen().addComment(text);
-        }
-
-        public ASIfStatement newIf(String condition) {
-                return getThen().newIf(condition);
-        }
-
-        public ASForStatement newFor(String init, String condition,        String update) {
-                return getThen().newFor(init, condition, update);
-        }
-
-        public ASForInStatement newForIn(String init, String list) {
-                return getThen().newForIn(init, list);
-        }
-
-        public ASForEachInStatement newForEachIn(String init, String list) {
-                return getThen().newForEachIn(init, list);
-        }
-
-        public ASWhileStatement newWhile(String condition) {
-                return getThen().newWhile(condition);
-        }
-
-        public ASDoWhileStatement newDoWhile(String condition) {
-                return getThen().newDoWhile(condition);
-        }
-
-        public ASSwitchStatement newSwitch(String condition) {
-                return getThen().newSwitch(condition);
-        }
-
-        public boolean containsCode() {
-                return getThen().containsCode();
-        }
-
</pre><pre class="diff" id="context">         public void setThen(ASBlock block) {
                LinkedListTree theBlock = ((ASTStatementList)block).getAST();
                ASTIterator i = new ASTIterator(ast);
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</span><br />
<div class="fileheader"><big><b>ASTASSwitchCase.java</b></big> <small id="info">406 -> 407</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASSwitchCase.java        2007-02-11 20:00:17 UTC (rev 406)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASSwitchCase.java        2007-02-12 00:04:50 UTC (rev 407)
@@ -6,18 +6,11 @@
</small></pre><pre class="diff" id="context">
package uk.co.badgersinfoil.metaas.impl;
</pre><pre class="diff" id="removed">-import uk.co.badgersinfoil.metaas.dom.ASDoWhileStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForEachInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForStatement;
-import uk.co.badgersinfoil.metaas.dom.ASIfStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.ASSwitchCase;
</pre><pre class="diff" id="removed">-import uk.co.badgersinfoil.metaas.dom.ASSwitchStatement;
-import uk.co.badgersinfoil.metaas.dom.ASWhileStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.StatementContainer;
import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
</pre><pre class="diff" id="removed">-public class ASTASSwitchCase implements ASSwitchCase {
</pre><pre class="diff" id="added">+public class ASTASSwitchCase <span id="addedchars">extends ContainerDelegate </span>implements ASSwitchCase {
</pre><pre class="diff" id="context">
        private static final int INDEX_LABELVAL = 0;
        private static final int INDEX_CONTAINER = 1;
</pre><pre class="diff"><small id="info">@@ -39,47 +32,8 @@
</small></pre><pre class="diff" id="context">         private LinkedListTree getChild(int index) {
                return (LinkedListTree)ast.getChild(index);
        }
</pre><pre class="diff" id="removed">-        private StatementContainer getContainer() {
</pre><pre class="diff" id="added">+        protected StatementContainer getStatementContainer() {
</pre><pre class="diff" id="context">                 return new ASTStatementList(getChild(INDEX_CONTAINER));
        }
</pre><pre class="diff" id="removed">-        public void addStmt(String statement) {
-                getContainer().addStmt(statement);
-        }
-
-        public void addComment(String text) {
-                getContainer().addComment(text);
-        }
-
-        public ASIfStatement newIf(String condition) {
-                return getContainer().newIf(condition);
-        }
-
-        public ASForStatement newFor(String init, String condition, String update) {
-                return getContainer().newFor(init, condition, update);
-        }
-
-        public ASForInStatement newForIn(String init, String list) {
-                return getContainer().newForIn(init, list);
-        }
-
-        public ASForEachInStatement newForEachIn(String init, String list) {
-                return getContainer().newForEachIn(init, list);
-        }
-
-        public ASWhileStatement newWhile(String condition) {
-                return getContainer().newWhile(condition);
-        }
-
-        public ASDoWhileStatement newDoWhile(String condition) {
-                return getContainer().newDoWhile(condition);
-        }
-
-        public ASSwitchStatement newSwitch(String condition) {
-                return getContainer().newSwitch(condition);
-        }
-
-        public boolean containsCode() {
-                return getContainer().containsCode();
-        }
</pre><pre class="diff" id="context"> }
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</span><br />
<div class="fileheader"><big><b>ASTASSwitchDefault.java</b></big> <small id="info">406 -> 407</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASSwitchDefault.java        2007-02-11 20:00:17 UTC (rev 406)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASSwitchDefault.java        2007-02-12 00:04:50 UTC (rev 407)
@@ -6,18 +6,11 @@
</small></pre><pre class="diff" id="context">
package uk.co.badgersinfoil.metaas.impl;
</pre><pre class="diff" id="removed">-import uk.co.badgersinfoil.metaas.dom.ASDoWhileStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForEachInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForStatement;
-import uk.co.badgersinfoil.metaas.dom.ASIfStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.ASSwitchDefault;
</pre><pre class="diff" id="removed">-import uk.co.badgersinfoil.metaas.dom.ASSwitchStatement;
-import uk.co.badgersinfoil.metaas.dom.ASWhileStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.StatementContainer;
import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
</pre><pre class="diff" id="removed">-public class ASTASSwitchDefault implements ASSwitchDefault {
</pre><pre class="diff" id="added">+public class ASTASSwitchDefault <span id="addedchars">extends ContainerDelegate </span>implements ASSwitchDefault {
</pre><pre class="diff" id="context">
        private static final int INDEX_CONTAINER = 0;
        private LinkedListTree ast;
</pre><pre class="diff"><small id="info">@@ -29,47 +22,7 @@
</small></pre><pre class="diff" id="context">         private LinkedListTree getChild(int index) {
                return (LinkedListTree)ast.getChild(index);
        }
</pre><pre class="diff" id="removed">-        private StatementContainer getContainer() {
</pre><pre class="diff" id="added">+        protected StatementContainer getStatementContainer() {
</pre><pre class="diff" id="context">                 return new ASTStatementList(getChild(INDEX_CONTAINER));
        }
</pre><pre class="diff" id="removed">-
-        public void addStmt(String statement) {
-                getContainer().addStmt(statement);
-        }
-
-        public void addComment(String text) {
-                getContainer().addComment(text);
-        }
-
-        public ASIfStatement newIf(String condition) {
-                return getContainer().newIf(condition);
-        }
-
-        public ASForStatement newFor(String init, String condition, String update) {
-                return getContainer().newFor(init, condition, update);
-        }
-
-        public ASForInStatement newForIn(String init, String list) {
-                return getContainer().newForIn(init, list);
-        }
-
-        public ASForEachInStatement newForEachIn(String init, String list) {
-                return getContainer().newForEachIn(init, list);
-        }
-
-        public ASWhileStatement newWhile(String condition) {
-                return getContainer().newWhile(condition);
-        }
-
-        public ASDoWhileStatement newDoWhile(String condition) {
-                return getContainer().newDoWhile(condition);
-        }
-
-        public ASSwitchStatement newSwitch(String condition) {
-                return getContainer().newSwitch(condition);
-        }
-
-        public boolean containsCode() {
-                return getContainer().containsCode();
-        }
</pre><pre class="diff" id="context"> }
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</span><br />
<div class="fileheader"><big><b>ASTASWhileStatement.java</b></big> <small id="info">406 -> 407</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASWhileStatement.java        2007-02-11 20:00:17 UTC (rev 406)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASWhileStatement.java        2007-02-12 00:04:50 UTC (rev 407)
@@ -7,19 +7,12 @@
</small></pre><pre class="diff" id="context"> package uk.co.badgersinfoil.metaas.impl;
import org.asdt.core.internal.antlr.AS3Parser;
</pre><pre class="diff" id="removed">-
-import uk.co.badgersinfoil.metaas.dom.ASDoWhileStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForEachInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForStatement;
-import uk.co.badgersinfoil.metaas.dom.ASIfStatement;
-import uk.co.badgersinfoil.metaas.dom.ASSwitchStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.ASWhileStatement;
import uk.co.badgersinfoil.metaas.dom.StatementContainer;
import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
</pre><pre class="diff" id="removed">-public class ASTASWhileStatement implements ASWhileStatement {
</pre><pre class="diff" id="added">+public class ASTASWhileStatement <span id="addedchars">extends ContainerDelegate </span>implements ASWhileStatement {
</pre><pre class="diff" id="context">
        private static final int INDEX_CONDITION = 0;
        private static final int INDEX_STATEMENT = 1;
</pre><pre class="diff"><small id="info">@@ -33,50 +26,10 @@
</small></pre><pre class="diff" id="context">         private LinkedListTree getChild(int index) {
                return (LinkedListTree)ast.getChild(index);
        }
</pre><pre class="diff" id="removed">-        private StatementContainer getBlock() {
</pre><pre class="diff" id="added">+        protected StatementContainer getStatementContainer() {
</pre><pre class="diff" id="context">                 return new ASTStatementList(getChild(INDEX_STATEMENT));
        }
</pre><pre class="diff" id="removed">-        public void addStmt(String statement) {
-                getBlock().addStmt(statement);
-        }
-
-        public void addComment(String text) {
-                getBlock().addComment(text);
-        }
-
-        public ASIfStatement newIf(String condition) {
-                return getBlock().newIf(condition);
-        }
-
-        public ASForStatement newFor(String init, String condition,        String update) {
-                return getBlock().newFor(init, condition, update);
-        }
-
-        public ASForInStatement newForIn(String init, String list) {
-                return getBlock().newForIn(init, list);
-        }
-
-        public ASForEachInStatement newForEachIn(String init, String list) {
-                return getBlock().newForEachIn(init, list);
-        }
-
-        public ASWhileStatement newWhile(String condition) {
-                return getBlock().newWhile(condition);
-        }
-
-        public ASDoWhileStatement newDoWhile(String condition) {
-                return getBlock().newDoWhile(condition);
-        }
-
-        public ASSwitchStatement newSwitch(String condition) {
-                return getBlock().newSwitch(condition);
-        }
-
-        public boolean containsCode() {
-                return getBlock().containsCode();
-        }
-
</pre><pre class="diff" id="context">         public String getConditionString() {
                return ASTUtils.stringifyNode(ast.getFirstChild().getFirstChild());
        }
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</span><br />
<div class="fileheader"><big><b>ASTForInCommon.java</b></big> <small id="info">406 -> 407</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTForInCommon.java        2007-02-11 20:00:17 UTC (rev 406)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTForInCommon.java        2007-02-12 00:04:50 UTC (rev 407)
@@ -6,13 +6,6 @@
</small></pre><pre class="diff" id="context">
package uk.co.badgersinfoil.metaas.impl;
</pre><pre class="diff" id="removed">-import uk.co.badgersinfoil.metaas.dom.ASDoWhileStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForEachInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForInStatement;
-import uk.co.badgersinfoil.metaas.dom.ASForStatement;
-import uk.co.badgersinfoil.metaas.dom.ASIfStatement;
-import uk.co.badgersinfoil.metaas.dom.ASSwitchStatement;
-import uk.co.badgersinfoil.metaas.dom.ASWhileStatement;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.StatementContainer;
import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
</pre><pre class="diff"><small id="info">@@ -20,7 +13,7 @@
</small></pre><pre class="diff" id="context"> /**
* Common code implementing 'for-in' and 'for-each-in' loop behavior.
*/
</pre><pre class="diff" id="removed">-abstract class ASTForInCommon {
</pre><pre class="diff" id="added">+abstract class ASTForInCommon extends ContainerDelegate {
</pre><pre class="diff" id="context">
        private static final int INDEX_VAR = 0;
        private static final int INDEX_ITERATED = 1;
</pre><pre class="diff"><small id="info">@@ -53,47 +46,7 @@
</small></pre><pre class="diff" id="context">                 return (LinkedListTree)ast.getChild(index);
        }
</pre><pre class="diff" id="removed">-        private StatementContainer getBlock() {
</pre><pre class="diff" id="added">+        protected StatementContainer getStatementContainer() {
</pre><pre class="diff" id="context">                 return new ASTStatementList(getChild(INDEX_STATEMENT));
        }
</pre><pre class="diff" id="removed">-
-        public void addStmt(String statement) {
-                getBlock().addStmt(statement);
-        }
-
-        public void addComment(String text) {
-                getBlock().addComment(text);
-        }
-
-        public ASIfStatement newIf(String condition) {
-                return getBlock().newIf(condition);
-        }
-
-        public ASForStatement newFor(String init, String condition, String update) {
-                return getBlock().newFor(init, condition, update);
-        }
-
-        public ASForInStatement newForIn(String init, String list) {
-                return getBlock().newForIn(init, list);
-        }
-
-        public ASForEachInStatement newForEachIn(String init, String list) {
-                return getBlock().newForEachIn(init, list);
-        }
-
-        public ASWhileStatement newWhile(String condition) {
-                return getBlock().newWhile(condition);
-        }
-
-        public ASDoWhileStatement newDoWhile(String condition) {
-                return getBlock().newDoWhile(condition);
-        }
-
-        public ASSwitchStatement newSwitch(String condition) {
-                return getBlock().newSwitch(condition);
-        }
-
-        public boolean containsCode() {
-                return getBlock().containsCode();
-        }
-}
</pre><pre class="diff" id="added">+}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname" id="added">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</span><br />
<div class="fileheader" id="added"><big><b>ContainerDelegate.java</b></big> <small id="info">added at 407</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ContainerDelegate.java        2007-02-11 20:00:17 UTC (rev 406)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ContainerDelegate.java        2007-02-12 00:04:50 UTC (rev 407)
@@ -0,0 +1,56 @@
</small></pre><pre class="diff" id="added">+package uk.co.badgersinfoil.metaas.impl;
+
+import java.util.List;
+import uk.co.badgersinfoil.metaas.dom.ASDoWhileStatement;
+import uk.co.badgersinfoil.metaas.dom.ASForEachInStatement;
+import uk.co.badgersinfoil.metaas.dom.ASForInStatement;
+import uk.co.badgersinfoil.metaas.dom.ASForStatement;
+import uk.co.badgersinfoil.metaas.dom.ASIfStatement;
+import uk.co.badgersinfoil.metaas.dom.ASSwitchStatement;
+import uk.co.badgersinfoil.metaas.dom.ASWhileStatement;
+import uk.co.badgersinfoil.metaas.dom.StatementContainer;
+
+public abstract class ContainerDelegate implements StatementContainer {
+
+        protected abstract StatementContainer getStatementContainer();
+
+        public void addStmt(String statement) {
+                getStatementContainer().addStmt(statement);
+        }
+
+        public void addComment(String text) {
+                getStatementContainer().addComment(text);
+        }
+
+        public ASIfStatement newIf(String condition) {
+                return getStatementContainer().newIf(condition);
+        }
+
+        public ASForStatement newFor(String init, String condition,        String update) {
+                return getStatementContainer().newFor(init, condition, update);
+        }
+
+        public ASForInStatement newForIn(String init, String list) {
+                return getStatementContainer().newForIn(init, list);
+        }
+
+        public ASForEachInStatement newForEachIn(String init, String list) {
+                return getStatementContainer().newForEachIn(init, list);
+        }
+
+        public ASWhileStatement newWhile(String condition) {
+                return getStatementContainer().newWhile(condition);
+        }
+
+        public ASDoWhileStatement newDoWhile(String condition) {
+                return getStatementContainer().newDoWhile(condition);
+        }
+
+        public ASSwitchStatement newSwitch(String condition) {
+                return getStatementContainer().newSwitch(condition);
+        }
+
+        public boolean containsCode() {
+                return getStatementContainer().containsCode();
+        }
+}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.12</small></center>
</body></html>