<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">ModifierUtils.java</a></tt> </td><td></td><td align="right" id="added">+128</td><td align="right" id="removed">-128</td><td nowrap="nowrap" align="center">638 -> 639</td></tr>
</table>
<pre class="comment">
GAR! Convert to use unix-style line endings
</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>ModifierUtils.java</b></big> <small id="info">638 -> 639</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ModifierUtils.java        2008-01-27 23:37:53 UTC (rev 638)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ModifierUtils.java        2008-01-27 23:50:47 UTC (rev 639)
@@ -1,129 +1,129 @@
</small></pre><pre class="diff" id="removed">-/**
- * ModifierUtils.java
- *
- * Copyright (c) 2006 David Holroyd
- */
-
-package uk.co.badgersinfoil.metaas.impl;
-
-import org.asdt.core.internal.antlr.AS3Parser;
-import uk.co.badgersinfoil.metaas.dom.Visibility;
-import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListToken;
-import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
-
-
-/**
- * Helpers for dealing with the modifiers list.
- */
-class ModifierUtils {
-
-        public static Visibility getVisibility(LinkedListTree modifiers) {
-                for (ASTIterator i=new ASTIterator(modifiers); i.hasNext(); ) {
-                        LinkedListTree mod = i.next();
-                        if (mod.getType() == AS3Parser.PRIVATE) {
-                                return Visibility.PRIVATE;
-                        }
-                        if (mod.getType() == AS3Parser.PUBLIC) {
-                                return Visibility.PUBLIC;
-                        }
-                        if (mod.getType() == AS3Parser.PROTECTED) {
-                                return Visibility.PROTECTED;
-                        }
-                        if (mod.getType() == AS3Parser.INTERNAL) {
-                                return Visibility.INTERNAL;
-                        }
-                }
-                return Visibility.DEFAULT;
-        }
-
-        public static void setVisibility(LinkedListTree modifiers, Visibility protection) {
-                for (ASTIterator i=new ASTIterator(modifiers); i.hasNext(); ) {
-                        LinkedListTree mod = i.next();
-                        if (isVisibilityKeyword(mod)) {
-                                if (Visibility.PRIVATE == protection) {
-                                        mod.token.setType(AS3Parser.PRIVATE);
-                                        mod.token.setText("private");
-                                } else if (Visibility.PUBLIC == protection) {
-                                        mod.token.setType(AS3Parser.PUBLIC);
-                                        mod.token.setText("public");
-                                } else if (Visibility.PROTECTED == protection) {
-                                        mod.token.setType(AS3Parser.PROTECTED);
-                                        mod.token.setText("protected");
-                                } else if (Visibility.INTERNAL == protection) {
-                                        mod.token.setType(AS3Parser.INTERNAL);
-                                        mod.token.setText("internal");
-                                } else if (Visibility.DEFAULT == protection) {
-                                        i.remove();
-                                        if (modifiers.getChildCount() == 0) {
-                                                deleteAllChildTokens(modifiers);
-                                        }
-                                }
-                                return;
-                        }
-                }
-                if (Visibility.PRIVATE == protection) {
-                        LinkedListTree node = ASTUtils.newAST(AS3Parser.PRIVATE, "private");
-                        node.appendToken(TokenBuilder.newSpace());
-                        modifiers.addChildWithTokens(node);
-                } else if (Visibility.PUBLIC == protection) {
-                        LinkedListTree node = ASTUtils.newAST(AS3Parser.PUBLIC, "public");
-                        node.appendToken(TokenBuilder.newSpace());
-                        modifiers.addChildWithTokens(node);
-                } else if (Visibility.PROTECTED == protection) {
-                        LinkedListTree node = ASTUtils.newAST(AS3Parser.PROTECTED, "protected");
-                        node.appendToken(TokenBuilder.newSpace());
-                        modifiers.addChildWithTokens(node);
-                } else if (Visibility.INTERNAL == protection) {
-                        LinkedListTree node = ASTUtils.newAST(AS3Parser.INTERNAL, "internal");
-                        node.appendToken(TokenBuilder.newSpace());
-                        modifiers.addChildWithTokens(node);
-                }
-        }
-
-        private static boolean isVisibilityKeyword(LinkedListTree mod) {
-                return mod.getType() == AS3Parser.PRIVATE
-                 ||mod.getType() == AS3Parser.PUBLIC
-                 ||mod.getType() == AS3Parser.PROTECTED
-                 ||mod.getType() == AS3Parser.INTERNAL;
-        }
-
-        private static void deleteAllChildTokens(LinkedListTree modifiers) {
-                for (LinkedListToken tok=modifiers.getStartToken(); tok!=null && tok!=modifiers.getStopToken(); ) {
-                        LinkedListToken next = tok.getNext();
-                        tok.delete();
-                        tok = next;
-                }
-                modifiers.setStartToken(null);
-                modifiers.setStopToken(null);
-        }
-
-        /**
-         * Constructs a new MODIFIERS node which represents the given
-         * visibility as an AST containing either "public", "private",
-         * "protected", "internal" or no children (i.e. default visibility).
-         */
-        public static LinkedListTree toModifiers(Visibility visibility) {
-                if (Visibility.DEFAULT.equals(visibility)) {
-                        return ASTUtils.newPlaceholderAST(AS3Parser.MODIFIERS);
-                }
-                LinkedListTree modifiers = ASTUtils.newImaginaryAST(AS3Parser.MODIFIERS);
-                if (Visibility.PUBLIC.equals(visibility)) {
-                        LinkedListTree modPublic = ASTUtils.newAST(AS3Parser.PUBLIC, "public");
-                        modPublic.appendToken(TokenBuilder.newSpace());
-                        modifiers.addChildWithTokens(modPublic);
-                } else if (Visibility.PRIVATE.equals(visibility)) {
-                        LinkedListTree modPrivate = ASTUtils.newAST(AS3Parser.PRIVATE, "private");
-                        modPrivate.appendToken(TokenBuilder.newSpace());
-                        modifiers.addChildWithTokens(modPrivate);
-                } else if (Visibility.PROTECTED.equals(visibility)) {
-                        LinkedListTree modProtected = ASTUtils.newAST(AS3Parser.PROTECTED, "protected");
-                        modProtected.appendToken(TokenBuilder.newSpace());
-                        modifiers.addChildWithTokens(modProtected);
-                } else if (Visibility.INTERNAL.equals(visibility)) {
-                        LinkedListTree modInternal = ASTUtils.newAST(AS3Parser.INTERNAL, "internal");
-                        modInternal.appendToken(TokenBuilder.newSpace());
-                        modifiers.addChildWithTokens(modInternal);
-                }
-                return modifiers;
-        }
</pre><pre class="diff" id="added">+/**
+ * ModifierUtils.java
+ *
+ * Copyright (c) 2006 David Holroyd
+ */
+
+package uk.co.badgersinfoil.metaas.impl;
+
+import org.asdt.core.internal.antlr.AS3Parser;
+import uk.co.badgersinfoil.metaas.dom.Visibility;
+import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListToken;
+import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
+
+
+/**
+ * Helpers for dealing with the modifiers list.
+ */
+class ModifierUtils {
+
+        public static Visibility getVisibility(LinkedListTree modifiers) {
+                for (ASTIterator i=new ASTIterator(modifiers); i.hasNext(); ) {
+                        LinkedListTree mod = i.next();
+                        if (mod.getType() == AS3Parser.PRIVATE) {
+                                return Visibility.PRIVATE;
+                        }
+                        if (mod.getType() == AS3Parser.PUBLIC) {
+                                return Visibility.PUBLIC;
+                        }
+                        if (mod.getType() == AS3Parser.PROTECTED) {
+                                return Visibility.PROTECTED;
+                        }
+                        if (mod.getType() == AS3Parser.INTERNAL) {
+                                return Visibility.INTERNAL;
+                        }
+                }
+                return Visibility.DEFAULT;
+        }
+
+        public static void setVisibility(LinkedListTree modifiers, Visibility protection) {
+                for (ASTIterator i=new ASTIterator(modifiers); i.hasNext(); ) {
+                        LinkedListTree mod = i.next();
+                        if (isVisibilityKeyword(mod)) {
+                                if (Visibility.PRIVATE == protection) {
+                                        mod.token.setType(AS3Parser.PRIVATE);
+                                        mod.token.setText("private");
+                                } else if (Visibility.PUBLIC == protection) {
+                                        mod.token.setType(AS3Parser.PUBLIC);
+                                        mod.token.setText("public");
+                                } else if (Visibility.PROTECTED == protection) {
+                                        mod.token.setType(AS3Parser.PROTECTED);
+                                        mod.token.setText("protected");
+                                } else if (Visibility.INTERNAL == protection) {
+                                        mod.token.setType(AS3Parser.INTERNAL);
+                                        mod.token.setText("internal");
+                                } else if (Visibility.DEFAULT == protection) {
+                                        i.remove();
+                                        if (modifiers.getChildCount() == 0) {
+                                                deleteAllChildTokens(modifiers);
+                                        }
+                                }
+                                return;
+                        }
+                }
+                if (Visibility.PRIVATE == protection) {
+                        LinkedListTree node = ASTUtils.newAST(AS3Parser.PRIVATE, "private");
+                        node.appendToken(TokenBuilder.newSpace());
+                        modifiers.addChildWithTokens(node);
+                } else if (Visibility.PUBLIC == protection) {
+                        LinkedListTree node = ASTUtils.newAST(AS3Parser.PUBLIC, "public");
+                        node.appendToken(TokenBuilder.newSpace());
+                        modifiers.addChildWithTokens(node);
+                } else if (Visibility.PROTECTED == protection) {
+                        LinkedListTree node = ASTUtils.newAST(AS3Parser.PROTECTED, "protected");
+                        node.appendToken(TokenBuilder.newSpace());
+                        modifiers.addChildWithTokens(node);
+                } else if (Visibility.INTERNAL == protection) {
+                        LinkedListTree node = ASTUtils.newAST(AS3Parser.INTERNAL, "internal");
+                        node.appendToken(TokenBuilder.newSpace());
+                        modifiers.addChildWithTokens(node);
+                }
+        }
+
+        private static boolean isVisibilityKeyword(LinkedListTree mod) {
+                return mod.getType() == AS3Parser.PRIVATE
+                 ||mod.getType() == AS3Parser.PUBLIC
+                 ||mod.getType() == AS3Parser.PROTECTED
+                 ||mod.getType() == AS3Parser.INTERNAL;
+        }
+
+        private static void deleteAllChildTokens(LinkedListTree modifiers) {
+                for (LinkedListToken tok=modifiers.getStartToken(); tok!=null && tok!=modifiers.getStopToken(); ) {
+                        LinkedListToken next = tok.getNext();
+                        tok.delete();
+                        tok = next;
+                }
+                modifiers.setStartToken(null);
+                modifiers.setStopToken(null);
+        }
+
+        /**
+         * Constructs a new MODIFIERS node which represents the given
+         * visibility as an AST containing either "public", "private",
+         * "protected", "internal" or no children (i.e. default visibility).
+         */
+        public static LinkedListTree toModifiers(Visibility visibility) {
+                if (Visibility.DEFAULT.equals(visibility)) {
+                        return ASTUtils.newPlaceholderAST(AS3Parser.MODIFIERS);
+                }
+                LinkedListTree modifiers = ASTUtils.newImaginaryAST(AS3Parser.MODIFIERS);
+                if (Visibility.PUBLIC.equals(visibility)) {
+                        LinkedListTree modPublic = ASTUtils.newAST(AS3Parser.PUBLIC, "public");
+                        modPublic.appendToken(TokenBuilder.newSpace());
+                        modifiers.addChildWithTokens(modPublic);
+                } else if (Visibility.PRIVATE.equals(visibility)) {
+                        LinkedListTree modPrivate = ASTUtils.newAST(AS3Parser.PRIVATE, "private");
+                        modPrivate.appendToken(TokenBuilder.newSpace());
+                        modifiers.addChildWithTokens(modPrivate);
+                } else if (Visibility.PROTECTED.equals(visibility)) {
+                        LinkedListTree modProtected = ASTUtils.newAST(AS3Parser.PROTECTED, "protected");
+                        modProtected.appendToken(TokenBuilder.newSpace());
+                        modifiers.addChildWithTokens(modProtected);
+                } else if (Visibility.INTERNAL.equals(visibility)) {
+                        LinkedListTree modInternal = ASTUtils.newAST(AS3Parser.INTERNAL, "internal");
+                        modInternal.appendToken(TokenBuilder.newSpace());
+                        modifiers.addChildWithTokens(modInternal);
+                }
+                return modifiers;
+        }
</pre><pre class="diff" id="context"> }
</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>