flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gordonsm...@apache.org
Subject svn commit: r1454275 [2/3] - in /flex/falcon/trunk/compiler/src/org/apache/flex/compiler: internal/parsing/as/ internal/parsing/mxml/ internal/scopes/ internal/tree/mxml/ mxml/ problems/
Date Fri, 08 Mar 2013 08:29:32 GMT
Added: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLInstructionData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLInstructionData.java?rev=1454275&view=auto
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLInstructionData.java (added)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLInstructionData.java Fri Mar  8 08:29:30 2013
@@ -0,0 +1,31 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.mxml;
+
+/**
+ * Represents an XML processing instruction.
+ */
+public interface IMXMLInstructionData extends IMXMLUnitData
+{
+    /**
+     * Returns the raw processing instruction. It is up to clients to parse this.
+     */
+    String getInstructionText();
+}

Propchange: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLInstructionData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLNamespaceAttributeData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLNamespaceAttributeData.java?rev=1454275&view=auto
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLNamespaceAttributeData.java (added)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLNamespaceAttributeData.java Fri Mar  8 08:29:30 2013
@@ -0,0 +1,39 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.mxml;
+
+/**
+ * Represents a namespace attribute in MXML.
+ */
+public interface IMXMLNamespaceAttributeData extends IMXMLTagAttributeData
+{
+    /**
+     * Returns the prefix found in this <code>xmlns</code> attribute.
+     * The prefix may be an empty string.
+     * 
+     * @return A prefix, or an empty string.
+     */
+    String getNamespacePrefix();
+
+    /**
+     * Returns the namespace that this <code>xmlns</code> attribute represents.
+     */
+    String getNamespace();
+}

Propchange: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLNamespaceAttributeData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagAttributeData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagAttributeData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagAttributeData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagAttributeData.java Fri Mar  8 08:29:30 2013
@@ -22,46 +22,151 @@ package org.apache.flex.compiler.mxml;
 import java.util.Collection;
 
 import org.apache.flex.compiler.common.ISourceLocation;
+import org.apache.flex.compiler.common.XMLName;
 import org.apache.flex.compiler.internal.mxml.MXMLDialect;
 import org.apache.flex.compiler.internal.parsing.ISourceFragment;
 import org.apache.flex.compiler.problems.ICompilerProblem;
 
 /**
- * Encapsulation of a tag attribute in MXML.
+ * Represents an attribute in MXML.
  */
 public interface IMXMLTagAttributeData extends ISourceLocation
 {
+    /**
+     * Gets the MXML dialect used in the document containing this attribute.
+     * 
+     * @return An {@link MXMLDialect} object.
+     */
     MXMLDialect getMXMLDialect();
     
-    MXMLTagData getParent();
+    /**
+     * Gets the tag to which this attribute belongs.
+     */
+    IMXMLTagData getParent();
+    
+    /**
+     * Gets the name of this attribute as written, such as <code>"s:width.over"</code>.
+     * 
+     * @return The complete attribute name, including a possible prefix and state.
+     */
+    String getName();
     
+    /**
+     * Gets the prefix of this attribute.
+     * <p>
+     * If the attribute does not have a prefix, this method returns <code>null</code>.
+     * 
+     * @return The prefix as a String, or <code>null</code>.
+     */
     String getPrefix();
 
+    /**
+     * Gets the URI of this attribute.
+     * <p>
+     * If the attribute does not have a prefix, this method returns
+     * <code>null</code>.
+     * 
+     * @return The URI as a String, or <code>null</code>.
+     */
     String getURI();
     
-    String getName();
-    
+    /**
+     * Gets the short name of this attribute, not including the prefix or state.
+     * 
+     * @return The short attribute name as a <code>String</code>
+     */
     String getShortName();
     
+    /**
+     * Gets the name of this attribute as an {@code XMLName}.
+     * <p>
+     * This takes into account the prefix but not the state.
+     * 
+     * @return The attribute name as an {@code XMLName}.
+     */
+    XMLName getXMLName();
+    
+    /**
+     * Gets the state name for this attribute.
+     * 
+     * @return The state name as a <code>String</code>
+     */
     String getStateName();
     
+    /**
+     * Returns <code>true</code> if this attribute has the specified short name
+     * and it either has no prefix or has a prefix that maps to the language
+     * URI.
+     * 
+     * @return <code>true</code> or <code>false</code>.
+     */
     boolean isSpecialAttribute(String name);
     
+    /**
+     * Returns <code>true</code> if this attribute has a value.
+     * 
+     * @return <code>true</code> or <code>false</code>.
+     */
     boolean hasValue();
     
-    MXMLTagAttributeValue[] getValues();
+    /**
+     * Returns an array of {@code IMXMLTagAttributeValue} objects
+     * representing the various parts of value of this attribute.
+     * 
+     * @return An array of {@code IMXMLTagAttributeValue} objects.
+     */
+    IMXMLTagAttributeValue[] getValues();
 
+    /**
+     * Gets the value of this attribute as a String.
+     * <p>
+     * The delimiting quotes are not included.
+     * 
+     * @return The attribute value.
+     */
+    // TODO Rename this to getValue()
     String getRawValue();
     
+    /**
+     * Gets the galue of this attribute as an array of source fragments.
+     * 
+     * @param problems The collection of compiler problems to which problems are to be added.
+     * @return An array of source fragments.
+     */
     ISourceFragment[] getValueFragments(Collection<ICompilerProblem> problems);
     
+    /**
+     * Gets the starting offset of the value of this attribute.
+     * 
+     * @return The starting offset.
+     */
     int getValueStart();
     
+    /**
+     * Gets the ending offset of the value of this attribute.
+     * 
+     * @return The ending offset.
+     */
     int getValueEnd();
     
+    /**
+     * Gets the line number of the start of the value of this attribute.
+     * 
+     * @return The ending offset.
+     */
     int getValueLine();
     
+    /**
+     * Gets the column number of the start of the value of this attribute.
+     * 
+     * @return The ending offset.
+     */
     int getValueColumn();
     
+    /**
+     * Gets the source location of the start of the value of this attribute.
+     * 
+     * @return The sourced location.
+     */
     ISourceLocation getValueLocation();
 }

Added: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagAttributeValue.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagAttributeValue.java?rev=1454275&view=auto
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagAttributeValue.java (added)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagAttributeValue.java Fri Mar  8 08:29:30 2013
@@ -0,0 +1,43 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.mxml;
+
+import org.apache.flex.compiler.common.ISourceLocation;
+import org.apache.flex.compiler.mxml.IMXMLTextData.TextType;
+
+/**
+ * Represents an attribute value in MXML.
+ */
+public interface IMXMLTagAttributeValue extends ISourceLocation
+{
+    /**
+     * Gets the type of text for this part of the attribute value.
+     * 
+     * @return A {@link TextType} value.
+     */
+    TextType getTextType();
+    
+    /**
+     * Gets the content of thsi part of the attribute value.
+     * 
+     * @return The content as a <code>String</code>.
+     */
+    String getContent();
+}

Propchange: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagAttributeValue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagBlobData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagBlobData.java?rev=1454275&view=auto
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagBlobData.java (added)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagBlobData.java Fri Mar  8 08:29:30 2013
@@ -0,0 +1,36 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.mxml;
+
+/** 
+ * Represents a blob of MXML.
+ * <p>
+ * An MXML blob is a large chunk of MXML data that was passed over during
+ * tokenization. A blob, for example could be the contents of an <code>&lt;fx:Private&gt; tag.
+ */
+public interface IMXMLTagBlobData extends IMXMLUnitData
+{
+    /**
+     * Gets the content of the blob.
+     * 
+     * @return The blob's content as a <code>String</code>.
+     */
+    String getName();
+}

Propchange: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagBlobData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTagData.java Fri Mar  8 08:29:30 2013
@@ -22,57 +22,208 @@ package org.apache.flex.compiler.mxml;
 import org.apache.flex.compiler.common.ISourceLocation;
 import org.apache.flex.compiler.common.PrefixMap;
 import org.apache.flex.compiler.common.XMLName;
-import org.apache.flex.compiler.filespecs.IFileSpecification;
-import org.apache.flex.compiler.internal.mxml.MXMLDialect;
 
 /**
- * Encapsulation of an open tag, a close tag, or an empty tag in MXML.
+ * Represents an open tag, a close tag, or an empty tag in MXML.
  */
-public interface IMXMLTagData extends ISourceLocation
-{
-    IFileSpecification getSource();
-        
-    MXMLDialect getMXMLDialect();
-    
-    IMXMLData getParent();
-    
+public interface IMXMLTagData extends IMXMLUnitData
+{        
+    /**
+     * Gets the tag that contains this tag.
+     * <p>
+     * If the document is not balanced before this tag, this method returns <code>null</code>.
+     *
+     * @return An {@code IMXMLTagData} object.
+     */
     IMXMLTagData getParentTag();
     
+    /**
+     * Determines whether this tag is empty.
+     * 
+     * @return <code>true</code> if it is.</code>
+     */
     boolean isEmptyTag();
     
+    /**
+     * Determines whether this tag is a close tag.
+     * 
+     * @return <code>true</code> if it is.</code>
+     */
     boolean isCloseTag();
     
+    /**
+     * Determines whether this tag has an actual close tag,
+     * and was not closed as a post-process step of MXML repair.
+     * 
+     * @return If we have an explicit close tag.
+     */
+    boolean hasExplicitCloseTag();
+    
+    /**
+     * Gets the name of this tag as written, such as <code>"s:width.over"</code>.
+     * 
+     * @return The complete tag name, including a possible prefix and state.
+     */
+    String getName();
+    
+    /**
+     * Gets the prefix of this tag.
+     * <p>
+     * If the tag does not have a prefix, this method returns <code>null</code>.
+     * 
+     * @return The prefix as a String, or <code>null</code>.
+     */
     String getPrefix();
     
+    /**
+     * Gets the namespace mappings specified on this tag.
+     * 
+     * @return A prefix map.
+     */
     PrefixMap getPrefixMap();
     
+    /**
+     * Gets the namespace mapping that apply to this tag,
+     * taking ancestor tags into account.
+     * 
+     * @return A prefix map.
+     */
     PrefixMap getCompositePrefixMap();
     
+    /**
+     * Gets the URI of this tag.
+     * <p>
+     * If the tag does not have a prefix, this method returns
+     * <code>null</code>.
+     * 
+     * @return The URI as a String, or <code>null</code>.
+     */
     String getURI();
     
-    String getName();
-    
+    /**
+     * Gets the short name of this tag, not including the prefix or state.
+     * 
+     * @return The short tag name as a <code>String</code>
+     */
     String getShortName();
     
+    /**
+     * Gets the name of this tag as an {@code XMLName}.
+     * <p>
+     * This takes into account the prefix but not the state.
+     * 
+     * @return The tag name as an {@code XMLName}.
+     */
     XMLName getXMLName();
     
+    /**
+     * Gets the state name for this tag.
+     * 
+     * @return The state name as a <code>String</code>
+     */
     String getStateName();
     
+    /**
+     * Determines whether the specified offset falls inside the attribute list of this tag.
+     * 
+     * @param offset The offset  to test.
+     * @return <code>true</code> if the offset falls inside this tag's attribute list.
+     */
+    boolean isOffsetInAttributeList(int offset);
+
+    /**
+     * Gets all of the attributes in this tag.
+     * 
+     * @return All of the attributes as a array of {@code IMXMLTagAttributeData} objects.
+     */
     IMXMLTagAttributeData[] getAttributeDatas();
     
+    /**
+     * Gets the attribute in this tag that has the specified name.
+     * 
+     * @param attributeName The name of the attribute.
+     * @return The attribute, or <code>null</code> if no such attribute exists.
+     */
     IMXMLTagAttributeData getTagAttributeData(String attributeName);
     
+    /**
+     * Gets the attribute value in this tag for the specified attribute name.
+     * <p>
+     * This value does not include the quotes.
+     * 
+     * @param attributeName The name of the attribute.
+     * @return The value of the attribute, or <code>null</code> if no such attribute exists.
+     */
+    // TODO Rename to getAttributevalue()
     String getRawAttributeValue(String attributeName);
     
+    /**
+     * Gets the source location of this tag's child units.
+     * 
+     * @return A source location.
+     */
     ISourceLocation getLocationOfChildUnits();
     
-    MXMLUnitData getFirstChildUnit();
-    
+    /**
+     * Gets the first child unit inside this tag.
+     * <p>
+     * The child unit may be a tag or text.
+     * If there is no child unit, this method returns <code>null</code>.
+     * 
+     * @return The first child unit inside this tag.
+     */
+    IMXMLUnitData getFirstChildUnit();
+    
+    /**
+     * Gets the first child open tag of this tag.
+     * <p>
+     * "First child" means the first open (or maybe empty) tag
+     * found before a close tag. If this is a close tag, this method
+     * starts looking after the corresponding start tag.
+     * 
+     * @return Child tag, or null if none.
+     */
     IMXMLTagData getFirstChild(boolean includeEmptyTags);
     
+    /**
+     * Gets the next sibling open tag of this tag.
+     * <p>
+     * "Sibling" is defined as the first open (or maybe empty) tag
+     * after this tag's close tag. If this is a close tag, this method
+     * starts looking after the corresponding start tag.
+     * 
+     * @return Sibling, or null if none.
+     */
     IMXMLTagData getNextSibling(boolean includeEmptyTags);
     
+    /**
+     * Finds the close tag that matches this tag.
+     * <p>
+     * Returns null if this tag is a close or empty tag.
+     * <p>
+     * Returns null if a surrounding tag is unbalanced; this is determined by
+     * backing up to the innermost parent tag with a different tag.
+     * <p>
+     * {@code <a> <b> <b> <-- find matching for this one will return null
+     * </b> </a> * }
+     */
     IMXMLTagData findMatchingEndTag();
     
+    /**
+     * Gets this compilable text inside this tag. The compilable text may appear
+     * as multiple child text units, and there may also be comments (which are
+     * ignored). If any child units are tags rather than text, they are simply
+     * ignored.
+     * 
+     * @return The compilable text inside this tag.
+     */
     String getCompilableText();
+    
+    /**
+     * Determines whether this tag does not actually exist within the MXML document
+     * that is its source.
+     * 
+     * @return <code>true</code> if this tag is implicit.
+     */
+    boolean isImplicit();
 }

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTextData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTextData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTextData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTextData.java Fri Mar  8 08:29:30 2013
@@ -19,62 +19,119 @@
 
 package org.apache.flex.compiler.mxml;
 
+import java.util.Collection;
+
+import org.apache.flex.compiler.internal.parsing.ISourceFragment;
+import org.apache.flex.compiler.problems.ICompilerProblem;
+
 /**
- * Represents a block of some form of text found in MXML content
+ * Represents a block of some form of text found in MXML content.
  */
-public interface IMXMLTextData
+public interface IMXMLTextData extends IMXMLUnitData
 {
-	/**
-	 * Represents different kinds of text elements
-	 */
-	enum TextType
-	{
-		/**
-		 * A CDATA block
-		 */
-		CDATA,
-		
-		/**
-		 * A comment block
-		 */
-		COMMENT,
-		
-		/**
-		 * Text
-		 */
-		TEXT,
-		
-		/**
-		 * An ASDoc comment block
-		 */
-		ASDOC,
-		
-		/**
-		 * Whitespace found in the MXML
-		 */
-		WHITESPACE,
-		
-		/**
-		 * Represents the contents of a databinding expression
-		 */
-		DATABINDING,
-		
-		/**
-		 * An MXML entity
-		 */
-		ENTITY,
-		
-		/**
-		 * An unknown text type
-		 */
-		OTHER
-	}
-	
-	String getContent();
-	
-	/**
-	 * Returns the type of text this data represents
-	 * @return a {@link TextType} vaue
-	 */
-	TextType getTextType();
+    /**
+     * Represents different kinds of text elements.
+     */
+    enum TextType
+    {
+        /**
+         * A CDATA block
+         */
+        CDATA,
+        
+        /**
+         * A comment block
+         */
+        COMMENT,
+        
+        /**
+         * Text
+         */
+        TEXT,
+        
+        /**
+         * An ASDoc comment block
+         */
+        ASDOC,
+        
+        /**
+         * Whitespace found in the MXML
+         */
+        WHITESPACE,
+        
+        /**
+         * Represents the contents of a databinding expression
+         */
+        DATABINDING,
+        
+        /**
+         * An MXML entity
+         */
+        ENTITY,
+        
+        /**
+         * An unknown text type
+         */
+        OTHER
+    }
+
+    /**
+     * Gets the type of the text.
+     * 
+     * @return A {@link TextType} value.
+     */
+    TextType getTextType();
+    
+    /**
+     * Gets the content of the text.
+     * 
+     * @return The content as a String.
+     */
+    String getContent();
+
+    /**
+     * Gets this unit's compilable text as a String.
+     * <p>
+     * Comments have no compilable text.
+     * The compilable text of a CDATA unit is the text between the <![CDATA[ and the ]]>.
+     * 
+     * @return This unit's compilable text.
+     */
+    String getCompilableText();
+    
+    /**
+     * Gets the start of this unit's compilable text.
+     * 
+     * @return The start of the compilable text
+     */
+    int getCompilableTextStart();
+
+    /**
+     * Gets the end of this unit's compilable text.
+     * 
+     * @return The end of the compilable text
+     */
+    int getCompilableTextEnd();
+    
+    /**
+     * Gets the line of this unit's compilable text.
+     * 
+     * @return The line of the compilable text
+     */
+    int getCompilableTextLine();
+
+    /**
+     * Gets the column of this unit's compilable text.
+     * 
+     * @return The column of the compilable text
+     */
+    int getCompilableTextColumn();
+    
+    /**
+     * Gets the source fragments that make up this text.
+     * 
+     * @param problems A collection of compiler problems to add problems to.
+     * @return An array of source fragments.
+     */
+    ISourceFragment[] getFragments(Collection<ICompilerProblem> problems);
 }

Added: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTextValue.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTextValue.java?rev=1454275&view=auto
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTextValue.java (added)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTextValue.java Fri Mar  8 08:29:30 2013
@@ -0,0 +1,28 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.mxml;
+
+/**
+ * Represents a text attribute value in MXML.
+ */
+public interface IMXMLTextValue extends IMXMLTagAttributeValue
+{
+
+}

Propchange: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLTextValue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLUnitData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLUnitData.java?rev=1454275&view=auto
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLUnitData.java (added)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLUnitData.java Fri Mar  8 08:29:30 2013
@@ -0,0 +1,165 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.mxml;
+
+import org.apache.flex.compiler.common.ISourceLocation;
+import org.apache.flex.compiler.common.SourceLocation;
+import org.apache.flex.compiler.filespecs.IFileSpecification;
+import org.apache.flex.compiler.internal.mxml.MXMLDialect;
+
+/**
+ * Represents one unit of MXML.
+ */
+public interface IMXMLUnitData extends ISourceLocation
+{
+    /**
+     * Gets the source file that contains this unit.
+     * 
+     * @return An {@code IFileSpecification} representing the source file.
+     */
+    IFileSpecification getSource();
+
+    /**
+     * Gets the {@code IMXMLData} representing the MXML document that contains this unit.
+     * 
+     * @return The {@code IMXMLData} that contains this unit.
+     */
+    IMXMLData getParent();
+    
+    /**
+     * Returns the MXML dialect used in the MXML document that contains this unit.
+     * 
+     * @return An {@link MXMLDialect} object.
+     */
+    MXMLDialect getMXMLDialect();
+    
+    /**
+     * Get this unit's position in the {@code IMXMLData}.
+     * 
+     * @return The index of this unit.
+     */
+    int getIndex();
+    
+    /**
+     * Does this unit contain the given offset (excluding start and including
+     * end)?
+     * 
+     * @return true if the offset falls within this unit's bounds.
+     */
+    boolean containsOffset(int offset);
+
+    /**
+     * Gets the {@link IMXMLUnitData} which is the hierarchical parent of this
+     * unit in its parents array of IMXMLUnitData objects
+     * 
+     * @return the parent {@link IMXMLUnitData} or <code>null</code>.
+     */
+    IMXMLUnitData getParentUnitData();
+    
+    /**
+     * Get the nearest containing tag. Moving backwards through the list of
+     * tokens for this MXML file, this is the first open tag that you find for
+     * which you haven't found a corresponding close.
+     * 
+     * @return nearest containing open tag (or null, if no such open tag exists)
+     */
+    IMXMLTagData getContainingTag(int offset);
+
+    /**
+     * Is this MXML unit a block of text?
+     * 
+     * @return true if the unit is a block of text
+     */
+    boolean isText();
+
+    /**
+     * Is this MXML unit a tag?
+     * 
+     * @return true if the unit is a tag
+     */
+    boolean isTag();
+    
+    /**
+     * Is this MXML unit an open tag?
+     * 
+     * @return true if the unit is an open tag
+     */
+    boolean isOpenTag();
+    
+    /**
+     * Is this MXML unit an open tag and not an empty tag (i.e. only
+     * &lt;foo&gt;, not &ltfoo;/&gt;)?
+     * 
+     * @return true if the unit is an open tag, and not an empty tag
+     */
+    boolean isOpenAndNotEmptyTag();
+
+    /**
+     * Is this MXML unit an close tag?
+     * 
+     * @return true if the unit is a close tag
+     */
+    boolean isCloseTag();
+
+    /**
+     * Returns the first character of the actual content of the unit For most
+     * units this is the same as getStart(), but for things like tags which have
+     * "junk punctuation" around them, {@link SourceLocation#getAbsoluteStart()}
+     * will return the junk punctuation, whereas getContentStart will get the
+     * content inside the punctuation.
+     */
+    int getContentStart();
+
+    /**
+     * Returns the offset after the last character of actual content. See
+     * {@link #getContentStart()} for more.
+     */
+    int getContentEnd();
+    
+    /**
+     * Gets the next MXML unit.
+     * 
+     * @return The next MXML unit.
+     */
+    IMXMLUnitData getNext();
+    
+    /**
+     * Gets the next sibling unit after this unit. The next sibling unit may be
+     * a tag or text. If there is no sibling unit after this one, this method
+     * returns <code>null</code>.
+     * 
+     * @return The next sibling unit.
+     */
+    IMXMLUnitData getNextSiblingUnit();
+    
+    /**
+     * Gets the next tag.
+     * 
+     * @return The next tag, or null if none.
+     */
+    IMXMLTagData getNextTag();
+    
+    /**
+     * Gets the previous MXML unit.
+     * 
+     * @return the previous MXML unit.
+     */
+    IMXMLUnitData getPrevious();
+}

Propchange: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/IMXMLUnitData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLData.java Fri Mar  8 08:29:30 2013
@@ -133,7 +133,7 @@ public class MXMLData implements IMXMLDa
     /**
      * Individual units for each open tag, close tag, and block of text
      */
-    private MXMLUnitData[] units;
+    private IMXMLUnitData[] units;
 
     /**
      * Flag indicating that the tokens underlying this structure were fixed
@@ -143,9 +143,9 @@ public class MXMLData implements IMXMLDa
     private boolean shouldRepair = true;
 
     /**
-     * This maps {@link MXMLTagData} objects to their explicit {@link PrefixMap} if it exist
+     * This maps {@link IMXMLTagData} objects to their explicit {@link PrefixMap} if it exist
      */
-    private HashMap<MXMLTagData, PrefixMap> nsMap;
+    private HashMap<IMXMLTagData, PrefixMap> nsMap;
 
     /**
      * The cursor holds the result of last offset lookup into the MXMLData
@@ -280,32 +280,26 @@ public class MXMLData implements IMXMLDa
         }
     }
     
-    /**
-     * @return {@link MXMLDialect} The detailed version information
-     */
+    @Override
     public MXMLDialect getMXMLDialect() {
         return mxmlDialect;
     }
     
-    /**
-     * Returns the PrefixMap for the given {@link MXMLTagData}.  This will not walk up the chain of prefix maps if this tag does not physically have uri->namespace mappings
-     * @param data the {@link MXMLTagData} to find the {@link PrefixMap} for
-     * @return a {@link PrefixMap} or null
-     */
-    public PrefixMap getPrefixMapForData(MXMLTagData data) {
+    @Override
+    public PrefixMap getPrefixMapForData(IMXMLTagData data) {
         PrefixMap result = nsMap.get(data);
         if (result != null)
             return result;
         if (data.isCloseTag())
         {
-            MXMLTagData openTagData = data.getParent().findTagOrSurroundingTagContainingOffset(data.getAbsoluteStart());
+            IMXMLTagData openTagData = data.getParent().findTagOrSurroundingTagContainingOffset(data.getAbsoluteStart());
             if (openTagData != null)
                 return nsMap.get(openTagData);
         }
         return null;
     }
     
-    void removePrefixMappingForTag(MXMLTagData data) {
+    void removePrefixMappingForTag(IMXMLTagData data) {
         nsMap.remove(data);
     }
     
@@ -313,19 +307,19 @@ public class MXMLData implements IMXMLDa
         nsMap.clear();
     }
     
-    public void setPrefixMappings(HashMap<MXMLTagData, PrefixMap> map) {
+    public void setPrefixMappings(HashMap<IMXMLTagData, PrefixMap> map) {
         if(nsMap != null)
             nsMap.clear();
         nsMap = map;
     }
     
-    public Map<MXMLTagData, PrefixMap> getTagToPrefixMap() {
+    public Map<IMXMLTagData, PrefixMap> getTagToPrefixMap() {
         return nsMap;
     }
     
     /**
      * Returns a collection of prefix->namespaces mappings found within this document.  This map DOES NOT maintain order, and for more fine-grained information, the getPrefixMap call on
-     * individual {@link MXMLTagData} and {@link MXMLTagAttributeData} objects should be called
+     * individual {@link IMXMLTagData} and {@link IMXMLTagAttributeData} objects should be called
      * @return a prefix map
      */
     public PrefixMap getDocumentPrefixMap() {
@@ -343,13 +337,14 @@ public class MXMLData implements IMXMLDa
      * @return a {@link PrefixMap} or null
      */
     public PrefixMap getRootTagPrefixMap() {
-        MXMLTagData rootTag = getRootTag();
+        IMXMLTagData rootTag = getRootTag();
         if(rootTag != null) {
             return nsMap.get(rootTag);
         }
         return null;
     }
     
+    @Override
     public Collection<ICompilerProblem> getProblems() {
         return problems;
     }
@@ -370,14 +365,12 @@ public class MXMLData implements IMXMLDa
         this.wasRepaired = wasRepaired;
     }
 
+    @Override
     public IFileSpecification getFileSpecification() {
         return new FileSpecification(path);
     }
     
-    /**
-     * Returns the underlying path to the file on disk that created this {@link MXMLData}
-     * @return the path
-     */
+    @Override
     public String getPath() {
         return path;
     }
@@ -411,7 +404,7 @@ public class MXMLData implements IMXMLDa
      */
     private void parse(MXMLData data, List<MXMLToken> tokens, MXMLDialect dialect, Collection<ICompilerProblem> problems) {
         ArrayList<MXMLUnitData> units = new ArrayList<MXMLUnitData>(tokens.size() / 6);
-        nsMap = new HashMap<MXMLTagData, PrefixMap>();
+        nsMap = new HashMap<IMXMLTagData, PrefixMap>();
         MXMLUnitData unit = null;
         MXMLToken currentComment = null;
         FastStack<Integer> depth = new FastStack<Integer>(tokens.size() / 8);
@@ -545,7 +538,7 @@ public class MXMLData implements IMXMLDa
                     }
             }
         }
-        this.units = units.toArray(new MXMLUnitData[0]);
+        this.units = units.toArray(new IMXMLUnitData[0]);
         if(fullContent && shouldRepair) {
             this.units = processor.balance(this.units, this, nsMap);
             if(processor.wasRepaired()) { //repaired, so let's rebuild our prefix maps and tag depths
@@ -572,35 +565,32 @@ public class MXMLData implements IMXMLDa
         depth.clear();
         depth.push(-1);
         for(int i = 0; i < units.length; i++) {
-            if(units[i] instanceof MXMLTagData) {
-                MXMLTagData currentTag = (MXMLTagData)units[i];
+            if(units[i] instanceof IMXMLTagData) {
+                IMXMLTagData currentTag = (IMXMLTagData)units[i];
                 if(currentTag.isCloseTag()) {
                     if(!currentTag.isEmptyTag())
                         depth.pop();
                 }
-                currentTag.setParentUnitDataIndex(depth.peek());
-                currentTag.setLocation(this, i);
+                ((MXMLTagData)currentTag).setParentUnitDataIndex(depth.peek());
+                ((MXMLTagData)currentTag).setLocation(this, i);
                 if(currentTag.isOpenTag()) {
                     if(!currentTag.isEmptyTag()) {
                         depth.push(i);
                     }
                 }
             } else {
-                units[i].setParentUnitDataIndex(depth.peek());
-                units[i].setLocation(this, i);
+                ((MXMLUnitData)units[i]).setParentUnitDataIndex(depth.peek());
+                ((MXMLUnitData)units[i]).setLocation(this, i);
             } 
         }
     }
 
-    /**
-     * Get the MXML units found in this {@link MXMLData}
-     * @return          an array of the {@link MXMLUnitData}
-     */
-    public MXMLUnitData[] getUnits() {
+    @Override
+    public IMXMLUnitData[] getUnits() {
         return units;
     }
 
-    public Iterator<MXMLUnitData> getUnitIterator() {
+    public Iterator<IMXMLUnitData> getUnitIterator() {
         return new MXMLUnitDataIterator(units);
     }
 
@@ -608,25 +598,18 @@ public class MXMLData implements IMXMLDa
      * Replace the list of units in this MXMLData.
      * @param units     units to add
      */
-    public void setUnits(MXMLUnitData[] units) {
+    public void setUnits(IMXMLUnitData[] units) {
         this.units = units;
     }
 
-    /**
-     * Get an MXML unit by index
-     * @param i         the index into the list of MXML units
-     * @return          the specified MXML unit (or null if the index is invalid)
-     */
-    public MXMLUnitData getUnit(int i) {
+    @Override
+    public IMXMLUnitData getUnit(int i) {
         if (i < 0 || i >= units.length)
             return null;
         return units[i];
     }
     
-    /**
-     * how many MXMLUnitData are available?
-     * @return number of MXMLUnitData
-     */
+    @Override
     public int getNumUnits() {
         return units.length;
     }
@@ -641,7 +624,7 @@ public class MXMLData implements IMXMLDa
      * so that for a given MXML file, falcon will find the same "nearest" unit.
      */
         
-    protected MXMLUnitData findNearestUnit(int offset) {
+    protected IMXMLUnitData findNearestUnit(int offset) {
         
         // Use the cursor as a fast search hint. But only if the cursor is at or before the
         // are of interest.
@@ -655,9 +638,9 @@ public class MXMLData implements IMXMLDa
             startOffset = 0;
 
         // Now iterate though the units and find the first one that is acceptable
-        MXMLUnitData ret = null;
+        IMXMLUnitData ret = null;
         for (int i = startOffset; (i < units.length) && (ret==null); i++) {
-            MXMLUnitData unit = units[i];
+            IMXMLUnitData unit = units[i];
 
             // unit is a match if it "contains" the offset.
             // We are using a somewhat bizarre form of "contains" here, in that we are
@@ -690,7 +673,7 @@ public class MXMLData implements IMXMLDa
      * @param offset            test offset
      * @return                  reference unit for containment searches
      */
-    public MXMLUnitData findContainmentReferenceUnit(int offset) {
+    public IMXMLUnitData findContainmentReferenceUnit(int offset) {
         return findNearestUnit(offset);
     }
 
@@ -699,8 +682,8 @@ public class MXMLData implements IMXMLDa
      * @param offset            test offset
      * @return                  the containing unit (or null if no unit contains this offset)
      */
-    public MXMLUnitData findUnitContainingOffset(int offset) {
-        MXMLUnitData unit = findNearestUnit(offset);
+    public IMXMLUnitData findUnitContainingOffset(int offset) {
+        IMXMLUnitData unit = findNearestUnit(offset);
         if (unit != null && unit.containsOffset(offset))
             return unit;
 
@@ -716,28 +699,22 @@ public class MXMLData implements IMXMLDa
      * @param offset            test offset
      * @return                  the containing tag (or null, if no tag contains this offset)
      */
-    public MXMLTagData findTagContainingOffset(int offset) {
-        MXMLUnitData unit = findUnitContainingOffset(offset);
+    public IMXMLTagData findTagContainingOffset(int offset) {
+        IMXMLUnitData unit = findUnitContainingOffset(offset);
         if (unit != null && unit.isTag())
-            return (MXMLTagData) unit;
+            return (IMXMLTagData) unit;
 
         return null;
     }
 
-    /**
-     * Similar to findTagContainingOffset, but if the unit inside offset is a text node,
-     * will return the surrounding tag instead.
-     *
-     * @param offset offset
-     * @return the containing/surrounding tag, or null if one can not be found
-     */
-    public MXMLTagData findTagOrSurroundingTagContainingOffset(int offset) {
-        MXMLUnitData unit = findUnitContainingOffset(offset);
+    @Override
+    public IMXMLTagData findTagOrSurroundingTagContainingOffset(int offset) {
+        IMXMLUnitData unit = findUnitContainingOffset(offset);
         if (unit != null) {
             if (unit.isTag()) {
-                return (MXMLTagData) unit;
+                return (IMXMLTagData) unit;
             } else if (unit.isText()) {
-                MXMLTagData containingTag = unit.getContainingTag(unit.getAbsoluteStart());
+                IMXMLTagData containingTag = unit.getContainingTag(unit.getAbsoluteStart());
                 return containingTag;
             }
         }
@@ -754,8 +731,8 @@ public class MXMLData implements IMXMLDa
      * @return                  tag whose attribute list contains this offset (or null,
      *                          if the offset isn't in any attribute lists
      */
-    public MXMLTagData findAttributeListContainingOffset(int offset) {
-        MXMLTagData tag = findTagContainingOffset(offset);
+    public IMXMLTagData findAttributeListContainingOffset(int offset) {
+        IMXMLTagData tag = findTagContainingOffset(offset);
         if (tag != null && tag.isOpenTag())
             return tag.isOffsetInAttributeList(offset) ? tag : null;
 
@@ -775,25 +752,20 @@ public class MXMLData implements IMXMLDa
         return start < offset && end >= offset;
     }
     
-    /**
-     * Gets the root tag of the MXMLData.
-     * @return An {@link MXMLTagData} for the root tag. 
-     */
-    public MXMLTagData getRootTag()
+    @Override
+    public IMXMLTagData getRootTag()
     {
         int n = units.length;
         for (int i = 0; i < n; i++)
         {
-            MXMLUnitData unit = units[i];
-            if (unit instanceof MXMLTagData)
-                return (MXMLTagData)unit;
+            IMXMLUnitData unit = units[i];
+            if (unit instanceof IMXMLTagData)
+                return (IMXMLTagData)unit;
         }
         return null;
     }
     
-    /**
-     * Gets the ending offset of the last unit.
-     */
+    @Override
     public int getEnd()
     {
         final int n = getNumUnits();
@@ -813,9 +785,9 @@ public class MXMLData implements IMXMLDa
      */
     public boolean verify()
     {
-        for (MXMLUnitData unit : getUnits())
+        for (IMXMLUnitData unit : getUnits())
         {
-            unit.verify();
+            ((MXMLUnitData)unit).verify();
         }
         
         return true;
@@ -824,9 +796,9 @@ public class MXMLData implements IMXMLDa
     // For debugging only.
     void dumpUnits()
     {  
-        for (MXMLUnitData unit : getUnits())
+        for (IMXMLUnitData unit : getUnits())
         {
-            System.out.println(unit.toDumpString());
+            System.out.println(((MXMLUnitData)unit).toDumpString());
         }
     }
     
@@ -838,7 +810,7 @@ public class MXMLData implements IMXMLDa
     {
         StringBuffer sb = new StringBuffer();
         
-        MXMLUnitData[] units = getUnits();
+        IMXMLUnitData[] units = getUnits();
         int n = units.length;
         for (int i = 0; i < n; i++)
         {

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLDatabindingData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLDatabindingData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLDatabindingData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLDatabindingData.java Fri Mar  8 08:29:30 2013
@@ -27,7 +27,7 @@ import org.apache.flex.compiler.parsing.
 /**
  * Represents a databinding expression found within content of MXML
  */
-public class MXMLDatabindingData extends MXMLUnitData implements IMXMLTextData, IMXMLDatabindingData
+public class MXMLDatabindingData extends MXMLUnitData implements IMXMLDatabindingData
 {
     /**
      * Constructor.
@@ -41,25 +41,9 @@ public class MXMLDatabindingData extends
         setColumn(start.getColumn());
     }
 
-    private MXMLDatabindingValue bindingValue;
+    private IMXMLDatabindingValue bindingValue;
     
     //
-    // IMXMLTextData implementations
-    //
-    
-    @Override
-    public String getContent()
-    {
-        return bindingValue.getContent();
-    }
-
-    @Override
-    public TextType getTextType()
-    {
-        return TextType.DATABINDING;
-    }
-
-    //
     // IMXMLDatabindingData implementations
     //
 

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLDatabindingValue.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLDatabindingValue.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLDatabindingValue.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLDatabindingValue.java Fri Mar  8 08:29:30 2013
@@ -23,17 +23,18 @@ import java.util.ArrayList;
 import java.util.ListIterator;
 
 import org.apache.flex.compiler.internal.parsing.mxml.MXMLToken;
+import org.apache.flex.compiler.mxml.IMXMLTextData.TextType;
 import org.apache.flex.compiler.parsing.IASToken;
 
 /**
  * Represents a databinding expression found within an attribute value
  */
-public class MXMLDatabindingValue extends MXMLTagAttributeValue implements IMXMLDatabindingData
+public class MXMLDatabindingValue extends MXMLTagAttributeValue implements IMXMLDatabindingValue
 {
     /**
      * Constructor.
      */
-    MXMLDatabindingValue(MXMLToken start, ListIterator<MXMLToken> iterator, MXMLTagAttributeData parent)
+    MXMLDatabindingValue(MXMLToken start, ListIterator<MXMLToken> iterator, IMXMLTagAttributeData parent)
     {
         super(parent);
         

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLEntityValue.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLEntityValue.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLEntityValue.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLEntityValue.java Fri Mar  8 08:29:30 2013
@@ -22,10 +22,11 @@ package org.apache.flex.compiler.mxml;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.flex.compiler.mxml.IMXMLTextData.TextType;
 import org.apache.flex.compiler.parsing.IMXMLToken;
 import org.apache.flex.compiler.parsing.MXMLTokenTypes;
 
-public class MXMLEntityValue extends MXMLTagAttributeValue implements IMXMLTextData, IMXMLEntityData
+public class MXMLEntityValue extends MXMLTagAttributeValue implements IMXMLEntityValue
 {
     private static final Map<String, String> NAMED_ENTITIES;
 
@@ -72,7 +73,7 @@ public class MXMLEntityValue extends MXM
     /**
      * Constructor.
      */
-    MXMLEntityValue(IMXMLToken token, MXMLTagAttributeData parent)
+    MXMLEntityValue(IMXMLToken token, IMXMLTagAttributeData parent)
     {
         super(parent);
 
@@ -113,7 +114,7 @@ public class MXMLEntityValue extends MXM
     }
 
     //
-    // IMXMLTextData implementations
+    // IMXMLTagAttributeValue implementations
     //
 
     @Override
@@ -129,7 +130,7 @@ public class MXMLEntityValue extends MXM
     }
 
     //
-    // IMXMLEntityData overrides
+    // IMXMLEntityValue implementations
     //
 
     @Override

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLInstructionData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLInstructionData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLInstructionData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLInstructionData.java Fri Mar  8 08:29:30 2013
@@ -21,7 +21,7 @@ package org.apache.flex.compiler.mxml;
 
 import org.apache.flex.compiler.parsing.IMXMLToken;
 
-public class MXMLInstructionData extends MXMLUnitData
+public class MXMLInstructionData extends MXMLUnitData implements IMXMLInstructionData
 {
     /**
      * Constructor.
@@ -81,7 +81,7 @@ public class MXMLInstructionData extends
     }
 
     //
-    // Other methods
+    // IMXMLInstructionData implementations
     //
 
     /**

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLNamespaceAttributeData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLNamespaceAttributeData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLNamespaceAttributeData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLNamespaceAttributeData.java Fri Mar  8 08:29:30 2013
@@ -30,7 +30,7 @@ import org.apache.flex.compiler.problems
 /**
  * Represents an xmlns style namespace import found within the MXML language
  */
-public class MXMLNamespaceAttributeData extends MXMLTagAttributeData
+public class MXMLNamespaceAttributeData extends MXMLTagAttributeData implements IMXMLNamespaceAttributeData
 {
     /**
      * Constructor.
@@ -46,21 +46,18 @@ public class MXMLNamespaceAttributeData 
     }
     
     private String prefix = "";
+    
+    //
+    // IMXMLNamepsaceAttributeData implementations
+    //
 
-    /**
-     * Returns the prefix found in this xmlns attribute. The prefix may be an
-     * empty string
-     * 
-     * @return a prefix, or an empty string
-     */
+    @Override
     public String getNamespacePrefix()
     {
         return prefix;
     }
 
-    /**
-     * Returns the namespace that this xmlns attribute represents
-     */
+    @Override
     public String getNamespace()
     {
         return getRawValue();

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagAttributeData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagAttributeData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagAttributeData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagAttributeData.java Fri Mar  8 08:29:30 2013
@@ -84,7 +84,7 @@ public class MXMLTagAttributeData extend
         }
         
         // Look for value token
-        ArrayList<MXMLTagAttributeValue> values = new ArrayList<MXMLTagAttributeValue>(3);
+        ArrayList<IMXMLTagAttributeValue> values = new ArrayList<IMXMLTagAttributeValue>(3);
         while (tokenIterator.hasNext())
         {
             token = tokenIterator.next();
@@ -122,7 +122,7 @@ public class MXMLTagAttributeData extend
         if (this.values.length > 0)
         {
             //set the start value
-            MXMLTagAttributeValue value = this.values[0];
+            IMXMLTagAttributeValue value = this.values[0];
             valueStart = value.getAbsoluteStart();
             valueLine = value.getLine();
             valueColumn = value.getColumn();
@@ -134,7 +134,7 @@ public class MXMLTagAttributeData extend
     /**
      * The MXML tag that contains this attribute
      */
-    protected MXMLTagData parent;
+    protected IMXMLTagData parent;
 
     /**
      * The name of this attribute.
@@ -159,7 +159,7 @@ public class MXMLTagAttributeData extend
     /**
      * Array of values inside this attribute data.
      */
-    private MXMLTagAttributeValue[] values = new MXMLTagAttributeValue[0];
+    private IMXMLTagAttributeValue[] values = new IMXMLTagAttributeValue[0];
 
     /**
      * The name of this state, if it exists
@@ -216,10 +216,8 @@ public class MXMLTagAttributeData extend
     // Other methods
     //
 
-    /**
-     * Gets this attribute's tag.
-     */
-    public MXMLTagData getParent()
+    @Override
+    public IMXMLTagData getParent()
     {
         return parent;
     }
@@ -229,7 +227,7 @@ public class MXMLTagAttributeData extend
      * 
      * @param parent MXML tag containing this attribute
      */
-    public void setParent(MXMLTagData parent)
+    public void setParent(IMXMLTagData parent)
     {
         this.parent = parent;
         setSourcePath(parent.getSourcePath());
@@ -253,8 +251,8 @@ public class MXMLTagAttributeData extend
             valueStart += offsetAdjustment;
             for (int i = 0; i < values.length; i++)
             {
-                values[i].setStart(values[i].getAbsoluteStart() + offsetAdjustment);
-                values[i].setEnd(values[i].getAbsoluteEnd() + offsetAdjustment);
+                ((MXMLTagAttributeValue)values[i]).setStart(values[i].getAbsoluteStart() + offsetAdjustment);
+                ((MXMLTagAttributeValue)values[i]).setEnd(values[i].getAbsoluteEnd() + offsetAdjustment);
             }
         }
         
@@ -262,21 +260,13 @@ public class MXMLTagAttributeData extend
             stateStart += offsetAdjustment;
     }
 
-    /**
-     * Get the attribute name as a String
-     * 
-     * @return attribute name
-     */
+    @Override
     public String getName()
     {
         return attributeName;
     }
 
-    /**
-     * Get the attribute name as a String
-     * 
-     * @return attribute name
-     */
+    @Override
     public String getStateName()
     {
         return stateName != null ? stateName : "";
@@ -292,17 +282,14 @@ public class MXMLTagAttributeData extend
         return stateName != null;
     }
 
+    @Override
     public boolean hasValue()
     {
         return values.length > 0;
     }
 
-    /**
-     * Returns all of the values contained inside this attribute value
-     * 
-     * @return an array of attribute values
-     */
-    public MXMLTagAttributeValue[] getValues()
+    @Override
+    public IMXMLTagAttributeValue[] getValues()
     {
         return values;
     }
@@ -317,10 +304,10 @@ public class MXMLTagAttributeData extend
         StringBuilder value = new StringBuilder();
         
         final int size = values.length;
-        MXMLTagAttributeValue lastData = null;
+        IMXMLTagAttributeValue lastData = null;
         for (int i = 0; i < size; i++)
         {
-            MXMLTagAttributeValue data = values[i];
+            IMXMLTagAttributeValue data = values[i];
             if (lastData != null)
             {
                 for (int s = 0; s < data.getAbsoluteStart() - lastData.getAbsoluteEnd(); i++)
@@ -334,12 +321,7 @@ public class MXMLTagAttributeData extend
         return value.toString();
     }
 
-    /**
-     * Get the attribute value as a String (without quotes)
-     * 
-     * @return attribute value (without quotes)
-     */
-    // TODO Rename to getValue()
+    @Override
     public String getRawValue()
     {
         String value = getValueWithQuotes();
@@ -357,6 +339,7 @@ public class MXMLTagAttributeData extend
         return value;
     }
 
+    @Override
     public ISourceFragment[] getValueFragments(Collection<ICompilerProblem> problems)
     {
         String value = getRawValue();
@@ -376,7 +359,7 @@ public class MXMLTagAttributeData extend
     // TODO Rename to getValueToken()
     public IMXMLToken getRawValueToken()
     {
-        if (hasState() && values.length == 1 && values[0] instanceof MXMLTextValue)
+        if (hasState() && values.length == 1 && values[0] instanceof IMXMLTextValue)
         {
             String value = getRawValue();
             if (value != null)
@@ -428,21 +411,13 @@ public class MXMLTagAttributeData extend
         return getAbsoluteStart() + attributeName.length();
     }
 
-    /**
-     * Get this attribute's value's start offset
-     * 
-     * @return value start offset
-     */
+    @Override
     public int getValueStart()
     {
         return hasValue() ? valueStart + 1 : 0;
     }
 
-    /**
-     * Get this attribute's value's end offset
-     * 
-     * @return value end offset
-     */
+    @Override
     public int getValueEnd()
     {
         if (hasValue())
@@ -460,16 +435,19 @@ public class MXMLTagAttributeData extend
         return -1;
     }
 
+    @Override
     public int getValueLine()
     {
         return hasValue() ? valueLine : 0;
     }
 
+    @Override
     public int getValueColumn()
     {
         return hasValue() ? valueColumn + 1 : 0;
     }
 
+    @Override
     public SourceLocation getValueLocation()
     {
         return new SourceLocation(getSourcePath(), getValueStart(), getValueEnd(),
@@ -567,14 +545,7 @@ public class MXMLTagAttributeData extend
         return false;
     }
 
-    /**
-     * Gets the prefix of this attribute.
-     * <p>
-     * If the attribute does not have a prefix, this method returns
-     * <code>null</code>.
-     * 
-     * @return The prefix as a String, or <code>null</code>
-     */
+    @Override
     public String getPrefix()
     {
         String name = getName();
@@ -582,6 +553,7 @@ public class MXMLTagAttributeData extend
         return i != -1 ? name.substring(0, i) : null;
     }
 
+    @Override
     public String getShortName()
     {
         String name = getName();
@@ -589,24 +561,13 @@ public class MXMLTagAttributeData extend
         return i != -1 ? name.substring(i + 1) : name;
     }
 
-    /**
-     * Get the tag name as an {@code XMLName}.
-     * 
-     * @return The tag name as an {@code XMLName}.
-     */
+    @Override
     public XMLName getXMLName()
     {
         return new XMLName(getURI(), getShortName());
     }
 
-    /**
-     * Gets the URI of this attribute.
-     * <p>
-     * If the attribute does not have a prefix, this method returns
-     * <code>null</code>.
-     * 
-     * @return The URI as a String, or <code>null</code>.
-     */
+    @Override
     public String getURI()
     {
         if (uri == null)
@@ -616,7 +577,7 @@ public class MXMLTagAttributeData extend
             if (prefix == null)
                 return null;
             
-            MXMLTagData lookingAt = parent;
+            IMXMLTagData lookingAt = parent;
             
             // For attributes with prefix, parent's parent can be null if
             // parent is the root tag 
@@ -641,22 +602,13 @@ public class MXMLTagAttributeData extend
         uri = null;
     }
 
-    /**
-     * Returns an object representing the MXML dialect used in the document
-     * containing this attribute.
-     * 
-     * @return An {@link MXMLDialect} object.
-     */
+    @Override
     public MXMLDialect getMXMLDialect()
     {
         return getParent().getParent().getMXMLDialect();
     }
 
-    /**
-     * Returns <code>true</code> if this attribute has the specified short name
-     * and it either has no prefix or has a prefix that maps to the language
-     * URI.
-     */
+    @Override
     public boolean isSpecialAttribute(String name)
     {
         String languageURI = getMXMLDialect().getLanguageNamespace();

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagAttributeValue.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagAttributeValue.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagAttributeValue.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagAttributeValue.java Fri Mar  8 08:29:30 2013
@@ -21,12 +21,12 @@ package org.apache.flex.compiler.mxml;
 
 import org.apache.flex.compiler.common.SourceLocation;
 
-public abstract class MXMLTagAttributeValue extends SourceLocation implements IMXMLTextData
+public abstract class MXMLTagAttributeValue extends SourceLocation implements IMXMLTagAttributeValue
 {
     /**
      * Constructor.
      */
-    public MXMLTagAttributeValue(MXMLTagAttributeData parent)
+    public MXMLTagAttributeValue(IMXMLTagAttributeData parent)
     {
         this.parent = parent;
         
@@ -37,13 +37,13 @@ public abstract class MXMLTagAttributeVa
     /**
      * The MXML attribute that contains this unit
      */
-    private MXMLTagAttributeData parent;
+    private IMXMLTagAttributeData parent;
 
     //
     // Other methods
     //
     
-    public MXMLTagAttributeData getContainingAttribute()
+    public IMXMLTagAttributeData getContainingAttribute()
     {
         return parent;
     }

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagBlobData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagBlobData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagBlobData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagBlobData.java Fri Mar  8 08:29:30 2013
@@ -25,7 +25,7 @@ import org.apache.flex.compiler.internal
  * An MXML blob is a large chunk of MXML data that was passed over during
  * tokenization. A blob, for example could be the contents of an fx:Private tag.
  */
-public class MXMLTagBlobData extends MXMLUnitData
+public class MXMLTagBlobData extends MXMLUnitData implements IMXMLTagBlobData
 {
     /**
      * Constructor.
@@ -54,9 +54,10 @@ public class MXMLTagBlobData extends MXM
     private String name;
     
     //
-    // Other methods
+    // IMXMLTagBlobData implementations
     //
 
+    @Override
     public String getName()
     {
         return name;

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTagData.java Fri Mar  8 08:29:30 2013
@@ -26,6 +26,7 @@ import java.util.LinkedHashMap;
 import java.util.ListIterator;
 import java.util.Map;
 
+import org.apache.flex.compiler.common.ISourceLocation;
 import org.apache.flex.compiler.common.MutablePrefixMap;
 import org.apache.flex.compiler.common.PrefixMap;
 import org.apache.flex.compiler.common.PrefixedXMLName;
@@ -47,7 +48,7 @@ import org.apache.flex.utils.FastStack;
  */
 public class MXMLTagData extends MXMLUnitData implements IMXMLTagData
 {
-    private static final MXMLTagAttributeData[] NO_ATTRIBUTES = new MXMLTagAttributeData[0];
+    private static final IMXMLTagAttributeData[] NO_ATTRIBUTES = new IMXMLTagAttributeData[0];
 
     /**
      * Constructor.
@@ -103,7 +104,7 @@ public class MXMLTagData extends MXMLUni
     /**
      * Map of attribute name to MXML attribute
      */
-    protected Map<String, MXMLTagAttributeData> attributeMap;
+    protected Map<String, IMXMLTagAttributeData> attributeMap;
     
     /*
      * offset where the tag name starts Note that we also use the for
@@ -159,7 +160,7 @@ public class MXMLTagData extends MXMLUni
     }
 
     @SuppressWarnings("fallthrough")
-    MutablePrefixMap init(MXMLData mxmlData, MXMLToken nameToken, ListIterator<MXMLToken> tokenIterator, MXMLDialect dialect, IFileSpecification spec, Collection<ICompilerProblem> problems)
+    MutablePrefixMap init(IMXMLData mxmlData, MXMLToken nameToken, ListIterator<MXMLToken> tokenIterator, MXMLDialect dialect, IFileSpecification spec, Collection<ICompilerProblem> problems)
     {
         setSourcePath(mxmlData.getPath());
         MutablePrefixMap map = null;
@@ -196,8 +197,8 @@ public class MXMLTagData extends MXMLUni
         setColumn(nameToken.getColumn());
         setLine(nameToken.getLine());
         attributesStart = getNameEnd();
-        ArrayList<MXMLTagAttributeData> attrs = new ArrayList<MXMLTagAttributeData>();
-        attributeMap = new LinkedHashMap<String, MXMLTagAttributeData>(); //preserve order of attrs
+        ArrayList<IMXMLTagAttributeData> attrs = new ArrayList<IMXMLTagAttributeData>();
+        attributeMap = new LinkedHashMap<String, IMXMLTagAttributeData>(); //preserve order of attrs
         boolean foundTagEnd = false;
         boolean putTokenBack = false; // This is a pre-falcon algorithm that helped recover from tag nesting errors
                                       // I am bringing it back to life
@@ -231,7 +232,7 @@ public class MXMLTagData extends MXMLUni
                         attribute = new MXMLNamespaceAttributeData(token, tokenIterator, dialect, spec, problems);
                         if (map == null)
                             map = new MutablePrefixMap();
-                        map.add(((MXMLNamespaceAttributeData)attribute).getNamespacePrefix(), ((MXMLNamespaceAttributeData)attribute).getNamespace());
+                        map.add(((IMXMLNamespaceAttributeData)attribute).getNamespacePrefix(), ((IMXMLNamespaceAttributeData)attribute).getNamespace());
                     }
                     else
                     {
@@ -404,24 +405,14 @@ public class MXMLTagData extends MXMLUni
         }
     }
 
-    /**
-     * Is this MXML unit a tag?
-     * 
-     * @return true if the unit is a tag
-     */
+    
     @Override
     public boolean isTag()
     {
         return true;
     }
 
-    /**
-     * Is this MXML unit an empty tag? (An "empty tag" is, I believe, a tag that
-     * opens and closes, i.e. &lt;foo/&gt; -- note that this is also considered
-     * an "open tag". -gse)
-     * 
-     * @return true if the unit is an empty tag
-     */
+    @Override
     public boolean isEmptyTag()
     {
         return emptyTag;
@@ -464,7 +455,7 @@ public class MXMLTagData extends MXMLUni
                 index--;
                 while (index >= 0)
                 {
-                    MXMLUnitData unit = getParent().getUnit(index);
+                    IMXMLUnitData unit = getParent().getUnit(index);
                     if (unit == null || unit.isTag())
                         return false;
                     index--;
@@ -487,34 +478,19 @@ public class MXMLTagData extends MXMLUni
         return nameType == MXMLTokenTypes.TOKEN_OPEN_TAG_START;
     }
 
-    /**
-     * Is this MXML unit an open tag and not an empty tag (i.e. only
-     * &lt;foo&gt;, not &ltfoo;/&gt;)?
-     * 
-     * @return true if the unit is an open tag, and not an empty tag
-     */
     @Override
     public boolean isOpenAndNotEmptyTag()
     {
         return (isOpenTag() && !isEmptyTag());
     }
 
-    /**
-     * Is this MXML unit a close tag? (i.e. &lt;/foo&gt;)
-     * 
-     * @return true if the unit is a close tag
-     */
     @Override
     public boolean isCloseTag()
     {
         return nameType == MXMLTokenTypes.TOKEN_CLOSE_TAG_START;
     }
 
-    /**
-     * Get the tag name as a string
-     * 
-     * @return the tag name (as a string)
-     */
+    @Override
     public String getName()
     {
         return tagName;
@@ -530,40 +506,23 @@ public class MXMLTagData extends MXMLUni
         return new PrefixedXMLName(getName(), getURI());
     }
 
-    /**
-     * Get the tag name as an {@code XMLName}.
-     * 
-     * @return The tag name as an {@code XMLName}.
-     */
+    @Override
     public XMLName getXMLName()
     {
         return new XMLName(getURI(), getShortName());
     }
 
-    /**
-     * Returns the {@link PrefixMap} that is explicitly set on this tag. If no
-     * uri->namespace mappings are set, this will return null
-     * 
-     * @return a {@link PrefixMap} or null
-     */
+    @Override
     public PrefixMap getPrefixMap()
     {
         return getParent().getPrefixMapForData(this);
     }
 
-    /**
-     * Returns the {@link PrefixMap} that represents all prefix->namespace
-     * mappings are in play on this tag. For example, if a parent tag defines
-     * <code>xmlns:m="falcon"</code> and this tag defines
-     * <code>xmlns:m="eagle"</code> then in this prefix map, m will equal
-     * "eagle"
-     * 
-     * @return a {@link PrefixMap} or null
-     */
+    @Override
     public PrefixMap getCompositePrefixMap()
     {
         MutablePrefixMap compMap = new MutablePrefixMap();
-        MXMLTagData lookingAt = this;
+        IMXMLTagData lookingAt = this;
         while (lookingAt != null)
         {
             PrefixMap depth = getParent().getPrefixMapForData(lookingAt);
@@ -576,13 +535,7 @@ public class MXMLTagData extends MXMLUni
         return compMap;
     }
 
-    /**
-     * Gets the prefix of this tag.
-     * <p>
-     * If the tag does not have a prefix, this method returns <code>null</code>.
-     * 
-     * @return The prefix as a String, or <code>null</code>.
-     */
+    @Override
     public String getPrefix()
     {
         String name = getName();
@@ -590,6 +543,7 @@ public class MXMLTagData extends MXMLUni
         return i != -1 ? name.substring(0, i) : "";
     }
 
+    @Override
     public String getShortName()
     {
         String name = getName();
@@ -597,20 +551,14 @@ public class MXMLTagData extends MXMLUni
         return i != -1 ? name.substring(i + 1) : name;
     }
 
-    /**
-     * Gets the URI of this tag.
-     * <p>
-     * If the tag does not have a prefix, this method returns <code>null</code>
-     * 
-     * @return The URI as a String, or <code>null</code>.
-     */
+    @Override
     public String getURI()
     {
         if (uri == null)
         {
             //walk up our chain to find the correct uri for our namespace.  first one wins
             String prefix = getPrefix();
-            MXMLTagData lookingAt = this;
+            IMXMLTagData lookingAt = this;
             while (lookingAt != null)
             {
                 PrefixMap depth = getParent().getPrefixMapForData(lookingAt);
@@ -635,11 +583,7 @@ public class MXMLTagData extends MXMLUni
         }
     }
 
-    /**
-     * Get the state name as a string
-     * 
-     * @return the tag name (as a string)
-     */
+    @Override
     public String getStateName()
     {
         return stateName != null ? stateName : "";
@@ -671,14 +615,7 @@ public class MXMLTagData extends MXMLUni
         return stateName != null ? stateName.length() + stateStart : 0;
     }
 
-    /**
-     * Get the raw attribute value for the named attribute. This value does not
-     * include the quotes.
-     * 
-     * @param attributeName name of the attribute
-     * @return value of the attribute (or null, if no such attribute exists)
-     */
-    // TODO Rename to getAttributevalue()
+    @Override
     public String getRawAttributeValue(String attributeName)
     {
         IMXMLTagAttributeData attributeData = attributeMap.get(attributeName);
@@ -687,13 +624,7 @@ public class MXMLTagData extends MXMLUni
         return null;
     }
 
-    /**
-     * Gets the attr data associated for the given name
-     * 
-     * @param attributeName name of the attribute
-     * @return the {@link MXMLTagAttributeData} (or null, if no such attribute
-     * exists)
-     */
+    @Override
     public IMXMLTagAttributeData getTagAttributeData(String attributeName)
     {
         return attributeMap.get(attributeName);
@@ -761,12 +692,7 @@ public class MXMLTagData extends MXMLUni
         return getAbsoluteEnd(); //attr end is just the end of this tag unit
     }
 
-    /**
-     * Does the offset fall inside this tag's attribute list?
-     * 
-     * @param offset test offset
-     * @return true iff the offset falls inside this tag's attribute list
-     */
+    @Override
     public boolean isOffsetInAttributeList(int offset)
     {
         return MXMLData.contains(attributesStart, getAbsoluteEnd(), offset);
@@ -807,11 +733,7 @@ public class MXMLTagData extends MXMLUni
         return attributeNames;
     }
 
-    /**
-     * Get all of the attributes in this tag
-     * 
-     * @return all of the attributes (as a MXMLTagAttributeData [])
-     */
+    @Override
     public IMXMLTagAttributeData[] getAttributeDatas()
     {
         return attributes;
@@ -853,12 +775,12 @@ public class MXMLTagData extends MXMLUni
         int endOffset = -1;
         if (!isEmptyTag() && isOpenTag())
         {
-            MXMLUnitData[] list = getParent().getUnits();
+            IMXMLUnitData[] list = getParent().getUnits();
             int index = getIndex() + 1;
             for (int i = index; i < list.length; i++)
             {
-                MXMLUnitData next = list[i];
-                if (next instanceof MXMLTextData && ((MXMLTextData)next).getTextType() == TextType.WHITESPACE)
+                IMXMLUnitData next = list[i];
+                if (next instanceof IMXMLTextData && ((IMXMLTextData)next).getTextType() == TextType.WHITESPACE)
                     continue;
                 if (next.isText())
                 {
@@ -879,45 +801,28 @@ public class MXMLTagData extends MXMLUni
         return new int[] {startOffset, endOffset};
     }
 
-    /**
-     * Gets this compilable text inside this tag. The compilable text may appear
-     * as multiple child text units, and there may also be comments (which are
-     * ignored). If any child units are tags rather than text, they are simply
-     * ignored.
-     * 
-     * @return The compilable text inside this tag.
-     */
+    @Override
     public String getCompilableText()
     {
         StringBuilder sb = new StringBuilder();
 
-        for (MXMLUnitData unit = getFirstChildUnit(); unit != null; unit = unit.getNextSiblingUnit())
+        for (IMXMLUnitData unit = getFirstChildUnit(); unit != null; unit = unit.getNextSiblingUnit())
         {
             if (unit.isText())
-                sb.append(((MXMLTextData)unit).getCompilableText());
+                sb.append(((IMXMLTextData)unit).getCompilableText());
         }
 
         return sb.toString();
     }
 
-    /**
-     * Return the close tag that matches this tag.
-     * <p>
-     * Returns null if this tag is a close or empty tag.
-     * <p>
-     * Returns null if a surrounding tag is unbalanced; this is determined by
-     * backing up to the innermost parent tag with a different tag.
-     * <p>
-     * {@code <a> <b> <b> <-- find matching for this one will return null
-     * </b> </a> * }
-     */
-    public MXMLTagData findMatchingEndTag()
+    @Override
+    public IMXMLTagData findMatchingEndTag()
     {
         return findMatchingEndTag(false);
     }
 
     /**
-     * Return the close tag that matches this tag.
+     * Finds the close tag that matches this tag.
      * <p>
      * Returns null if this tag is a close or empty tag.
      * <p>
@@ -928,16 +833,16 @@ public class MXMLTagData extends MXMLUni
      * {@code <a> <b> <b> <-- find matching for this one will return null
      * </b> </a> * }
      */
-    public MXMLTagData findMatchingEndTag(boolean includeImplicit)
+    public IMXMLTagData findMatchingEndTag(boolean includeImplicit)
     {
         if (isCloseTag() || isEmptyTag())
             return null;
         // Back up to the first surrounding tag that has a different name, and ensure
         // that *it* is balanced, saving our expected return value along the way.
-        MXMLTagData startTag = this;
+        IMXMLTagData startTag = this;
         while (true)
         {
-            MXMLTagData parentTag = startTag.getContainingTag(startTag.getAbsoluteStart());
+            IMXMLTagData parentTag = startTag.getContainingTag(startTag.getAbsoluteStart());
             if (parentTag == null)
                 break;
             startTag = parentTag;
@@ -950,15 +855,15 @@ public class MXMLTagData extends MXMLUni
         // off the tagStack, we've found our candidate result -- but keep going
         // until the stack is null, to ensure that we're balanced out to the
         // surrounding tag.
-        MXMLUnitData[] list = getParent().getUnits();
-        FastStack<MXMLTagData> tagStack = new FastStack<MXMLTagData>();
-        MXMLTagData result = null;
+        IMXMLUnitData[] list = getParent().getUnits();
+        FastStack<IMXMLTagData> tagStack = new FastStack<IMXMLTagData>();
+        IMXMLTagData result = null;
         for (int i = startTag.getIndex(); i < list.length; i++)
         {
-            MXMLUnitData curUnit = list[i];
+            IMXMLUnitData curUnit = list[i];
             if (curUnit.isTag())
             {
-                MXMLTagData curTag = (MXMLTagData)curUnit;
+                IMXMLTagData curTag = (IMXMLTagData)curUnit;
                 if (curTag.isEmptyTag())
                 {
                     // do nothing for empty tags.
@@ -974,7 +879,7 @@ public class MXMLTagData extends MXMLUni
                         // document is unbalanced.
                         return null;
                     }
-                    MXMLTagData pop = tagStack.pop();
+                    IMXMLTagData pop = tagStack.pop();
 
                     //check the short name in case the namespace is not spelled properly
                     if (!pop.getName().equals(curTag.getName()) && !pop.getShortName().equals(curTag.getShortName()))
@@ -999,12 +904,7 @@ public class MXMLTagData extends MXMLUni
         return null;
     }
 
-    /**
-     * Returns true if this tag does not actually exist within the MXML Document
-     * that is its source
-     * 
-     * @return true if we are implicit
-     */
+    @Override
     public boolean isImplicit()
     {
         return false;
@@ -1021,23 +921,18 @@ public class MXMLTagData extends MXMLUni
     {
         if (isCloseTag() || isEmptyTag())
             return explicitCloseToken;
-        MXMLTagData tagData = findMatchingEndTag();
+        IMXMLTagData tagData = findMatchingEndTag();
         return tagData != null && !tagData.isImplicit();
     }
 
-    /**
-     * Gets the first child unit inside this tag. The child unit may be a tag or
-     * text. If there is no child unit, this method returns <code>null</code>.
-     * 
-     * @return The first child unit inside this tag.
-     */
-    public MXMLUnitData getFirstChildUnit()
+    @Override
+    public IMXMLUnitData getFirstChildUnit()
     {
         // If this tag is <foo/> then it has no child units.
         if (!isOpenAndNotEmptyTag())
             return null;
 
-        MXMLUnitData next = getNext();
+        IMXMLUnitData next = getNext();
 
         // If this tag is followed immediately by its end tag,
         // as in <foo></foo>, then it has no child units.
@@ -1048,16 +943,10 @@ public class MXMLTagData extends MXMLUni
         return next;
     }
 
-    /**
-     * Get the first child open tag of this tag. "First Child" is defined as the
-     * first open (or maybe empty) tag found before a close tag. If this is a
-     * close tag, starts looking after the corresponding start tag.
-     * 
-     * @return Child tag, or null if none.
-     */
-    public MXMLTagData getFirstChild(boolean includeEmptyTags)
+    @Override
+    public IMXMLTagData getFirstChild(boolean includeEmptyTags)
     {
-        MXMLTagData nextTag = null;
+        IMXMLTagData nextTag = null;
         if (isEmptyTag())
             return null;
         if (isOpenTag())
@@ -1067,7 +956,7 @@ public class MXMLTagData extends MXMLUni
         else
         {
             // This is a close tag.  Start at the corresponding open tag.
-            MXMLTagData openTag = getContainingTag(getAbsoluteStart());
+            IMXMLTagData openTag = getContainingTag(getAbsoluteStart());
             nextTag = openTag.getNextTag();
         }
         // Skip any text blocks to find the next actual tag.  If it's an open tag,
@@ -1082,16 +971,10 @@ public class MXMLTagData extends MXMLUni
         }
     }
 
-    /**
-     * Get the next sibling open tag of this tag. "Sibling" is defined as the
-     * first open (or maybe empty) tag after this tag's close tag. If this is a
-     * close tag, starts looking after the corresponding start tag.
-     * 
-     * @return Sibling, or null if none.
-     */
-    public MXMLTagData getNextSibling(boolean includeEmptyTags)
+    @Override
+    public IMXMLTagData getNextSibling(boolean includeEmptyTags)
     {
-        MXMLTagData nextTag = null;
+        IMXMLTagData nextTag = null;
         // Be sure we're starting at the close tag, then get the next tag.
         if (isCloseTag() || isEmptyTag())
         {
@@ -1099,7 +982,7 @@ public class MXMLTagData extends MXMLUni
         }
         else
         {
-            MXMLTagData endTag = findMatchingEndTag();
+            IMXMLTagData endTag = findMatchingEndTag();
             if (endTag == null)
                 return null;
             nextTag = endTag.getNextTag();
@@ -1120,31 +1003,32 @@ public class MXMLTagData extends MXMLUni
      * @param includeEmptyTags <code>true</code> if empty tags should be included.
      * @return Array of children.
      */
-    public MXMLTagData[] getChildren(boolean includeEmptyTags)
+    public IMXMLTagData[] getChildren(boolean includeEmptyTags)
     {
-        ArrayList<MXMLTagData> children = new ArrayList<MXMLTagData>();
-        MXMLTagData child = getFirstChild(includeEmptyTags);
+        ArrayList<IMXMLTagData> children = new ArrayList<IMXMLTagData>();
+        IMXMLTagData child = getFirstChild(includeEmptyTags);
         while (child != null)
         {
             children.add(child);
             child = child.getNextSibling(includeEmptyTags);
         }
-        return children.toArray(new MXMLTagData[0]);
+        return children.toArray(new IMXMLTagData[0]);
     }
 
     /**
      * Return the parent tag of this tag. If the document is not balanced before
      * this tag, returns null.
      */
-    public MXMLTagData getParentTag()
+    public IMXMLTagData getParentTag()
     {
-        MXMLUnitData data = getParentUnitData();
-        if (data instanceof MXMLTagData)
-            return (MXMLTagData)data;
+        IMXMLUnitData data = getParentUnitData();
+        if (data instanceof IMXMLTagData)
+            return (IMXMLTagData)data;
         return null;
     }
 
-    public SourceLocation getLocationOfChildUnits()
+    @Override
+    public ISourceLocation getLocationOfChildUnits()
     {
         String sourcePath = getSourcePath();
         int start = getStart();
@@ -1154,7 +1038,7 @@ public class MXMLTagData extends MXMLUni
 
         boolean foundFirstChild = false;
 
-        for (MXMLUnitData unit = getFirstChildUnit(); unit != null; unit = unit.getNextSiblingUnit())
+        for (IMXMLUnitData unit = getFirstChildUnit(); unit != null; unit = unit.getNextSiblingUnit())
         {
             if (!foundFirstChild)
             {

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTextData.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTextData.java?rev=1454275&r1=1454274&r2=1454275&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTextData.java (original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/mxml/MXMLTextData.java Fri Mar  8 08:29:30 2013
@@ -190,13 +190,7 @@ public class MXMLTextData extends MXMLUn
         return s;
     }
 
-    /**
-     * Gets this unit's compilable text as a String. Comments have no compilable
-     * text. The compilable text of a CDATA unit is the text between the
-     * <![CDATA[ and the ]]>.
-     * 
-     * @return This unit's compilable text.
-     */
+    @Override
     public String getCompilableText()
     {
         switch (type)
@@ -219,44 +213,28 @@ public class MXMLTextData extends MXMLUn
         return null;
     }
 
-    /**
-     * Gets the start of this unit's compilable text.
-     * 
-     * @return the start of the compilable text
-     */
+    @Override
     public int getCompilableTextStart()
     {
         return getContentsStart();
     }
 
-    /**
-     * Gets the column of this unit's compilable text.
-     * 
-     * @return the column of the compilable text
-     */
-    public int getCompilableTextColumn()
+    @Override
+    public int getCompilableTextEnd()
     {
-        return (getContentsStart() - getAbsoluteStart()) + getColumn();
+        return getContentsEnd();
     }
-
-    /**
-     * Gets the line of this unit's compilable text.
-     * 
-     * @return the line of the compilable text
-     */
+    
+    @Override
     public int getCompilableTextLine()
     {
         return getLine();
     }
 
-    /**
-     * Gets the end of this unit's compilable text.
-     * 
-     * @return the end of the compilable text
-     */
-    public int getCompilableTextEnd()
+    @Override
+    public int getCompilableTextColumn()
     {
-        return getContentsEnd();
+        return (getContentsStart() - getAbsoluteStart()) + getColumn();
     }
 
     /**
@@ -390,6 +368,7 @@ public class MXMLTextData extends MXMLUn
         return getColumn();
     }
 
+    @Override
     public ISourceFragment[] getFragments(Collection<ICompilerProblem> problems)
     {
         ISourceLocation location = this;



Mime
View raw message