flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - changes required to get a real world test case to compile to SWF
Date Fri, 12 Jul 2013 17:32:45 GMT
Updated Branches:
  refs/heads/develop 4e31201a5 -> 42457f30f


changes required to get a real world test case to compile to SWF


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/42457f30
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/42457f30
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/42457f30

Branch: refs/heads/develop
Commit: 42457f30f4985043c6349866ffcab2c089778a33
Parents: 4e31201
Author: Alex Harui <aharui@apache.org>
Authored: Fri Jul 12 10:32:16 2013 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Jul 12 10:32:16 2013 -0700

----------------------------------------------------------------------
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java  |   1 -
 .../as/codegen/ABCGeneratingReducer.java        |   4 +
 .../as/codegen/MXMLClassDirectiveProcessor.java | 108 ++++++++++++++-----
 .../databinding/MXMLBindingDirectiveHelper.java |  20 +++-
 .../compiler/internal/mxml/EntityProcessor.java |  92 ++++++++++++++++
 .../internal/mxml/MXMLTagAttributeData.java     |   6 +-
 6 files changed, 200 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/42457f30/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index ebfd260..29b78ca 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -34,7 +34,6 @@ import org.apache.flex.compiler.codegen.mxml.flexjs.IMXMLFlexJSEmitter;
 import org.apache.flex.compiler.definitions.IClassDefinition;
 import org.apache.flex.compiler.definitions.IDefinition;
 import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
-import org.apache.flex.compiler.internal.codegen.databinding.BindingCodeGenUtils;
 import org.apache.flex.compiler.internal.codegen.databinding.BindingDatabase;
 import org.apache.flex.compiler.internal.codegen.databinding.BindingInfo;
 import org.apache.flex.compiler.internal.codegen.databinding.FunctionWatcherInfo;

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/42457f30/compiler/src/org/apache/flex/compiler/internal/as/codegen/ABCGeneratingReducer.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/as/codegen/ABCGeneratingReducer.java
b/compiler/src/org/apache/flex/compiler/internal/as/codegen/ABCGeneratingReducer.java
index 7654804..56bac61 100644
--- a/compiler/src/org/apache/flex/compiler/internal/as/codegen/ABCGeneratingReducer.java
+++ b/compiler/src/org/apache/flex/compiler/internal/as/codegen/ABCGeneratingReducer.java
@@ -5701,6 +5701,10 @@ public class ABCGeneratingReducer
                 continue;
 
             Object caseValue = current_case.constantCondition;
+            // a constant of value 90000 was in a SWC as a double even though
+            // the type of the constant was int
+            if (caseValue instanceof Double)
+                caseValue = new Integer(((Double)caseValue).intValue());
             assert (caseValue instanceof Integer) : "reduce_lookup_switchStmt called on non
integer case value";
             final int index = (Integer)caseValue - caseOffset;
             // if there is already a non-default value for this

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/42457f30/compiler/src/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
b/compiler/src/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
index 708376a..04d1d12 100644
--- a/compiler/src/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
+++ b/compiler/src/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
@@ -2416,6 +2416,13 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
         return n == null || isDataBindingNode(n);
     }
     
+    boolean isChildrenAsDataCodeGen(IMXMLExpressionNode node)
+    {
+        return (getProject().getTargetSettings().getMxmlChildrenAsData() && 
+                (node.getParent().getNodeID() == ASTNodeID.MXMLPropertySpecifierID ||
+                 node.getParent().getNodeID() == ASTNodeID.MXMLStyleSpecifierID));
+    }
+
     /**
      * Generates an instruction in the current context
      * to push the value of an {@code IMXMLBooleanNode}.
@@ -2425,7 +2432,7 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
      */
     void processMXMLBoolean(IMXMLBooleanNode booleanNode, Context context)
     {
-        if (getProject().getTargetSettings().getMxmlChildrenAsData() && booleanNode.getParent().getNodeID()
== ASTNodeID.MXMLPropertySpecifierID)
+        if (isChildrenAsDataCodeGen(booleanNode))
             context.addInstruction(OP_pushtrue); // simple type
 
         boolean value = isDataBound(booleanNode) ? false : booleanNode.getValue();      

@@ -2443,7 +2450,7 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
      */
     void processMXMLInt(IMXMLIntNode intNode, Context context)
     {
-        if (getProject().getTargetSettings().getMxmlChildrenAsData() && intNode.getParent().getNodeID()
== ASTNodeID.MXMLPropertySpecifierID)
+        if (isChildrenAsDataCodeGen(intNode))
             context.addInstruction(OP_pushtrue); // simple type
 
         int value = isDataBound(intNode) ? 0 : intNode.getValue();
@@ -2460,7 +2467,7 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
      */
     void processMXMLUint(IMXMLUintNode uintNode, Context context)
     {
-        if (getProject().getTargetSettings().getMxmlChildrenAsData() && uintNode.getParent().getNodeID()
== ASTNodeID.MXMLPropertySpecifierID)
+        if (isChildrenAsDataCodeGen(uintNode))
             context.addInstruction(OP_pushtrue); // simple type
 
         long value = isDataBound(uintNode) ? 0 : uintNode.getValue();
@@ -2477,7 +2484,7 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
      */
     void processMXMLNumber(IMXMLNumberNode numberNode, Context context)
     {
-        if (getProject().getTargetSettings().getMxmlChildrenAsData() && numberNode.getParent().getNodeID()
== ASTNodeID.MXMLPropertySpecifierID)
+        if (isChildrenAsDataCodeGen(numberNode))
             context.addInstruction(OP_pushtrue); // simple type
 
         double value = isDataBound(numberNode) ? Double.NaN : numberNode.getValue();
@@ -2494,7 +2501,7 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
      */
     void processMXMLString(IMXMLStringNode stringNode, Context context)
     {
-        if (getProject().getTargetSettings().getMxmlChildrenAsData() && stringNode.getParent().getNodeID()
== ASTNodeID.MXMLPropertySpecifierID)
+        if (isChildrenAsDataCodeGen(stringNode))
             context.addInstruction(OP_pushtrue); // simple type
 
         String value = isDataBound(stringNode) ? null : stringNode.getValue();
@@ -2520,6 +2527,9 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
         if (isDataBindingNode(classNode))
             return;
         
+        if (isChildrenAsDataCodeGen(classNode))
+            context.addInstruction(OP_pushtrue); // simple type
+
         IExpressionNode expressionNode = (IExpressionNode)classNode.getExpressionNode();
         if (expressionNode != null)
         {
@@ -2548,6 +2558,9 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
         if (isDataBindingNode(functionNode))
             return;
         
+        if (isChildrenAsDataCodeGen(functionNode))
+            context.addInstruction(OP_pushtrue); // simple type
+
         IExpressionNode expressionNode = (IExpressionNode)functionNode.getExpressionNode();
         if (expressionNode != null)
         {
@@ -3136,6 +3149,9 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
      */
     void processMXMLFactory(IMXMLFactoryNode factoryNode, Context context)
     {
+        if (getProject().getTargetSettings().getMxmlChildrenAsData())
+            context.addInstruction(OP_pushtrue);
+        
         // Get the Name for the mx.core.ClassFactory class.
         ICompilerProject project = getProject();
         ClassDefinition classReference = (ClassDefinition)factoryNode.getClassReference(project);
@@ -3461,23 +3477,35 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
             
             context.startUsing(IL.STYLES);
 
-            // Push the object on which we'll call setStyle().
-            context.pushTarget();
-            
-            // Push the first argument: the name of the style.
-            context.addInstruction(OP_pushstring, styleName);
-            
-            // Push the second argument: the value of the style.
-            // Do this by codegen'ing sole child, which is an IMXMLInstanceNode.
-            traverse(styleNode, context);
-            
             if (!getProject().getTargetSettings().getMxmlChildrenAsData())
             {
+                // Push the object on which we'll call setStyle().
+                context.pushTarget();
+                
+                // Push the first argument: the name of the style.
+                context.addInstruction(OP_pushstring, styleName);
+                
+                // Push the second argument: the value of the style.
+                // Do this by codegen'ing sole child, which is an IMXMLInstanceNode.
+                traverse(styleNode, context);
+                
                 // Call setStyle() with these two arguments
                 // and pop off off the return value,
                 // which is 'undefined' since the return type is void.
                 context.addInstruction(OP_callpropvoid, SET_STYLE_CALL_OPERANDS);
             }
+            else
+            {
+                // Push the first argument: the name of the style.
+                context.addInstruction(OP_pushstring, styleName);
+                
+                context.isContentFactory = false;
+                
+                // Push the second argument: the value of the style.
+                // Do this by codegen'ing sole child, which is an IMXMLInstanceNode.
+                traverse(styleNode, context);
+                                
+            }
             context.stopUsing(IL.STYLES, 1);
         }
     }
@@ -3492,6 +3520,13 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
         if (isStateDependent(effectNode))
             return;
         
+        // Data bound styles don't need this processing either
+        IMXMLInstanceNode value = effectNode.getInstanceNode();
+        if (isDataBindingNode(value))
+        {
+            return;
+        }
+
         String effectName = effectNode.getName();
 
         // Effect specifiers on the class definition node
@@ -3640,10 +3675,23 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
     
     void processMXMLDeclarations(IMXMLDeclarationsNode declarationsNode, Context context)
     {
-        // The <Declarations> tag itself generates no code,
-        // but we have to traverse the instance nodes that are its children
-        // and generate code for them.
-        traverse(declarationsNode, context);
+        if (getProject().getTargetSettings().getMxmlChildrenAsData())
+        {
+            context.startUsing(IL.MXML_CONTENT_FACTORY);
+            context.isContentFactory = true;
+            
+            traverse(declarationsNode, context);
+            
+            context.isContentFactory = false;
+            context.stopUsing(IL.MXML_CONTENT_FACTORY, 0);
+        }
+        else
+        {
+            // The <Declarations> tag itself generates no code,
+            // but we have to traverse the instance nodes that are its children
+            // and generate code for them.
+            traverse(declarationsNode, context);
+        }
     }
     
    void processMXMLScript(IMXMLScriptNode scriptNode, Context context)
@@ -3950,7 +3998,8 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
             context.addInstruction(OP_findpropstrict, overrideName);
             context.addInstruction(OP_getproperty, overrideName);
             
-            context.pushNumericConstant(3);
+            boolean valueIsDataBound = isDataBindingNode(propertyOrStyleNode.getChild(0));
+            context.pushNumericConstant(valueIsDataBound ? 2 : 3);
             // Set its 'target' property to the id of the object
             // whose property or style this override will set.
             context.addInstruction(OP_pushstring, "target");
@@ -3962,15 +4011,18 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
             context.addInstruction(OP_pushtrue);
             context.addInstruction(OP_pushstring, name);
 
-            // Set its 'value' property to the value of the property or style.
-            context.addInstruction(OP_pushstring, "value");
-            processNode(propertyOrStyleValueNode, context); // push value
-
+            if (!valueIsDataBound)
+            {
+                // Set its 'value' property to the value of the property or style.
+                context.addInstruction(OP_pushstring, "value");
+                processNode(propertyOrStyleValueNode, context); // push value
+            }
+            
             context.pushNumericConstant(0); // styles
             context.pushNumericConstant(0); // effects
             context.pushNumericConstant(0); // events
             context.addInstruction(OP_pushnull);
-            context.incrementCounter(IL.MXML_OVERRIDE_PROPERTIES, 15);      
+            context.incrementCounter(IL.MXML_OVERRIDE_PROPERTIES, valueIsDataBound ? 12 :
15);      
 
         }
         else
@@ -4082,7 +4134,8 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
             addItemsIL.addInstruction(OP_pushstring, "itemsDescriptor");
             addItemsIL.addInstruction(OP_pushtrue);  // the value is an array of descriptor
data that will be parsed later
             InstructionList il = nodeToInstanceDescriptorMap.get(instanceNode);
-            addItemsIL.addAll(il);
+            InstructionList ilCopy = (InstructionList)il.clone();
+            addItemsIL.addAll(ilCopy);
             addItemsCounter++;
         }
         else
@@ -4306,6 +4359,9 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
         ICompilerProject project = getProject();
         ClassDefinition classDefinition = (ClassDefinition)node.getClassReference(project);
         Name className = classDefinition != null ? classDefinition.getMName(project) : null;
+        if (getProject().getTargetSettings().getMxmlChildrenAsData())
+            context.addInstruction(OP_pushtrue);
+
         context.addInstruction(OP_getlex, className);        
     }
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/42457f30/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/MXMLBindingDirectiveHelper.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/MXMLBindingDirectiveHelper.java
b/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/MXMLBindingDirectiveHelper.java
index cd50b27..ee173cd 100644
--- a/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/MXMLBindingDirectiveHelper.java
+++ b/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/MXMLBindingDirectiveHelper.java
@@ -40,6 +40,7 @@ import org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor;
 import org.apache.flex.compiler.internal.codegen.databinding.WatcherInfoBase.WatcherType;
 import org.apache.flex.compiler.internal.projects.FlexProject;
 import org.apache.flex.compiler.internal.scopes.ASScope;
+import org.apache.flex.compiler.internal.tree.as.BinaryOperatorAsNode;
 import org.apache.flex.compiler.internal.tree.as.FunctionCallNode;
 import org.apache.flex.compiler.internal.tree.as.IdentifierNode;
 import org.apache.flex.compiler.internal.tree.as.MemberAccessExpressionNode;
@@ -213,10 +214,13 @@ public class MXMLBindingDirectiveHelper
             propertyCount += 2;
         }
         Set<Entry<Object, WatcherInfoBase>> watcherChains = bindingDataBase.getWatcherChains();
-        for (Entry<Object, WatcherInfoBase> entry : watcherChains)
+        if (watcherChains != null)
         {
-            WatcherInfoBase watcherInfoBase = entry.getValue();
-            propertyCount += encodeWatcher(ret, watcherInfoBase);
+            for (Entry<Object, WatcherInfoBase> entry : watcherChains)
+            {
+                WatcherInfoBase watcherInfoBase = entry.getValue();
+                propertyCount += encodeWatcher(ret, watcherInfoBase);
+            }
         }
         ret.addInstruction(OP_newarray,  propertyCount); 
         // now save array to _bindings property
@@ -322,6 +326,16 @@ public class MXMLBindingDirectiveHelper
             s = getSourceStringFromMemberAccessExpressionNode((MemberAccessExpressionNode)left);
         else if (left instanceof IdentifierNode)
             s = getSourceStringFromIdentifierNode((IdentifierNode)left);
+        else if (left instanceof BinaryOperatorAsNode)
+        {
+            left = (IExpressionNode)((BinaryOperatorAsNode)left).getChild(0);
+            if (left instanceof MemberAccessExpressionNode)
+                s = getSourceStringFromMemberAccessExpressionNode((MemberAccessExpressionNode)left);
+            else if (left instanceof IdentifierNode)
+                s = getSourceStringFromIdentifierNode((IdentifierNode)left);
+            else
+                System.out.println("expected binding BinaryOperatorAsNode left node" + node.toString());
+        }
         else
             System.out.println("expected binding member access left node" + node.toString());
         s += ".";

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/42457f30/compiler/src/org/apache/flex/compiler/internal/mxml/EntityProcessor.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/mxml/EntityProcessor.java b/compiler/src/org/apache/flex/compiler/internal/mxml/EntityProcessor.java
index ef494cf..1f6863f 100644
--- a/compiler/src/org/apache/flex/compiler/internal/mxml/EntityProcessor.java
+++ b/compiler/src/org/apache/flex/compiler/internal/mxml/EntityProcessor.java
@@ -71,6 +71,98 @@ public class EntityProcessor
      * are added if the entities in the input string are not recognized.
      * @return The output string, or <code>null</code> if there were entity problems.
      */
+    public static String parseAsString(String s, ISourceLocation location,
+                                          MXMLDialect mxmlDialect,
+                                          Collection<ICompilerProblem> problems)
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        // If the input string doesn't contain an ampersand character,
+        // then there are no entities to replace; just return a single
+        // fragment corresponding to the input string.
+        int ampersandIndex = s.indexOf(AMPERSAND);
+        if (ampersandIndex == -1)
+        {
+            return s;
+        }
+        else
+        {
+            // This variable will keep track of where we find the semicolon
+            // that ends the entity. By initializing it to the position
+            // before the beginning of the string, we can avoid having
+            // special logic to pick up the part of the string before
+            // the first entity; it becomes the same logic as picking up
+            // the part of the string between the first semicolon and the
+            // second ampersand.
+            int semicolonIndex = -1;
+            
+            while (true)
+            {
+                // We've found an ampersand.
+                // Build a fragment containing the text from the previous
+                // semicolon (or the beginning) to the this ampersand.
+                if (ampersandIndex > semicolonIndex + 1)
+                {
+                    String text = s.substring(semicolonIndex + 1, ampersandIndex);
+                    sb.append(text);
+                }
+
+                // Since we found an ampersand that starts an entity,
+                // look for a subsequent semicolon that ends it.
+                // If it doesn't exist, report a problem.
+                semicolonIndex = s.indexOf(SEMICOLON, ampersandIndex + 1);
+                if (semicolonIndex == -1)
+                {
+                    ICompilerProblem problem = new MXMLUnterminatedEntityProblem(location);
+                    problems.add(problem);
+                    break; // we can't do any further processing
+                }
+    
+                // Extract and convert the entity between the ampersand and the semicolon.
+                String physicalText = s.substring(ampersandIndex, semicolonIndex + 1);
+                String entityName = s.substring(ampersandIndex + 1, semicolonIndex);
+                int c = convertEntity(entityName, mxmlDialect);
+                if (c == -1)
+                {
+                    // If it doesn't convert to a character, create a problem and return
null.
+                    ICompilerProblem problem = new MXMLInvalidEntityProblem(location, physicalText);
+                    problems.add(problem);
+                }
+                else
+                {
+                    // If it does convert, add a fragment for the entity.
+                    String logicalText = String.copyValueOf(new char[] { (char)c });
+                    sb.append(logicalText);
+                }
+                
+                // Find the next ampersand after the semicolon.
+                ampersandIndex = s.indexOf(AMPERSAND, semicolonIndex + 1);
+                
+                // If there isn't one, we're done.
+                // Add a final fragment for the text after the last semicolon.
+                if (ampersandIndex == -1)
+                {
+                    if (semicolonIndex + 1 < s.length())
+                    {
+                        String text = s.substring(semicolonIndex + 1);
+                        sb.append(text);
+                    }
+                    break;
+                }
+            }
+        }
+        
+        return sb.toString();
+    }
+
+    /**
+     * Replaces all character entity references in a string.
+     * <p>
+     * @param s The input string.
+     * @param problems A collection of problems, to which {@code EntityProblem}s
+     * are added if the entities in the input string are not recognized.
+     * @return The output string, or <code>null</code> if there were entity problems.
+     */
     public static ISourceFragment[] parse(String s, ISourceLocation location,
                                           MXMLDialect mxmlDialect,
                                           Collection<ICompilerProblem> problems)

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/42457f30/compiler/src/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
b/compiler/src/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
index 05d48e7..c74dccb 100644
--- a/compiler/src/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
+++ b/compiler/src/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
@@ -28,6 +28,7 @@ import org.apache.flex.compiler.common.SourceLocation;
 import org.apache.flex.compiler.common.XMLName;
 import org.apache.flex.compiler.filespecs.IFileSpecification;
 import org.apache.flex.compiler.internal.parsing.ISourceFragment;
+import org.apache.flex.compiler.internal.parsing.SourceFragment;
 import org.apache.flex.compiler.internal.parsing.mxml.MXMLToken;
 import org.apache.flex.compiler.mxml.IMXMLTagAttributeData;
 import org.apache.flex.compiler.mxml.IMXMLTagData;
@@ -280,7 +281,10 @@ public class MXMLTagAttributeData extends SourceLocation implements IMXMLTagAttr
         ISourceLocation location = getValueLocation();
         MXMLDialect mxmlDialect = getMXMLDialect();
 
-        return EntityProcessor.parse(value, location, mxmlDialect, problems);
+        String s = EntityProcessor.parseAsString(value, location, mxmlDialect, problems);
+        ISourceFragment[] result = new ISourceFragment[1];
+        result[0] = new SourceFragment(s, location);
+        return result;
     }
 
     @Override


Mime
View raw message