Examples of IMXMLData


Examples of org.apache.flex.compiler.mxml.IMXMLData

        processUnits(builder);
    }

    private void processUnits(MXMLTreeBuilder builder)
    {
        IMXMLData mxmlData = builder.getMXMLData();
       
        // add problems that were encountered while parsing the data
        for (ICompilerProblem problem : mxmlData.getProblems())
        {
            builder.addProblem(problem);
        }

        if (mxmlData.getNumUnits() == 0)
            return;

        boolean foundRootTag = false;
        IMXMLTextData asDoc = null;

        // Walk the top-level units of the MXMLData.
        for (IMXMLUnitData unit = mxmlData.getUnit(0); unit != null; unit = unit.getNextSiblingUnit())
        {
            if (unit instanceof IMXMLInstructionData)
            {
                if (unit.getStart() > 0)
                {
View Full Code Here

Examples of org.apache.flex.compiler.mxml.IMXMLData

    private void setLocation(MXMLTreeBuilder builder)
    {
        String sourcePath = builder.getPath();

        MXMLCompilationUnit cu = builder.getCompilationUnit();
        IMXMLData mxmlData = builder.getMXMLData();

        // Find the extents of the file node by finding the last bit
        // of the MXMLData. Note that this assumes that MXMLData
        // represents trailing white space (which it currently does).
        // Note also that we can't just look at the file system,
        // because the MXMLFileNode might actually backed by an
        // in-memory document, not the original file.
        final String absoluteFilename = cu.getAbsoluteFilename();
        final int mxmlDataEnd = mxmlData.getEnd();
        // Convert from a local offset to an absolute offset
        final int[] possibleAbsoluteOffsets =
                offsetLookup.getAbsoluteOffset(absoluteFilename, mxmlDataEnd);
        assert possibleAbsoluteOffsets.length == 1 : "Expected only 1 match.";
        final int absoluteEnd = possibleAbsoluteOffsets[0];
View Full Code Here

Examples of org.apache.flex.compiler.mxml.IMXMLData

    private void processNamespaceAttribute(MXMLTreeBuilder builder, IMXMLTagData tag,
                                           IMXMLNamespaceAttributeData attribute)
    {
        String attributeURI = attribute.getNamespace();

        IMXMLData mxmlData = attribute.getParent().getParent();
        String languageURI = mxmlData.getMXMLDialect().getLanguageNamespace();

        if (MXMLDialect.isLanguageNamespace(attributeURI) &&
            !attributeURI.equals(languageURI))
        {
            ICompilerProblem problem = new MXMLOtherLanguageNamespaceProblem(attribute);
View Full Code Here

Examples of org.apache.flex.compiler.mxml.IMXMLData

        if (attributeURI == null)
            return false;

        String tagURI = attribute.getParent().getURI();

        IMXMLData mxmlData = attribute.getParent().getParent();
        MXMLDialect mxmlDialect = mxmlData.getMXMLDialect();
        String languageURI = mxmlDialect.getLanguageNamespace();

        boolean isPrivate = false;
        if (mxmlDialect.isEqualToOrAfter(MXMLDialect.MXML_2009))
        {
View Full Code Here

Examples of org.apache.flex.compiler.mxml.IMXMLData

        final IFileScopeRequestResult fileScopeRequestResult = getFileScopeRequest().get();
        final MXMLFileScope fileScope = (MXMLFileScope)fileScopeRequestResult.getScopes()[0];
       
        startProfile(Operation.GET_SYNTAX_TREE);
       
        final IMXMLData mxmlData = getMXMLData();
       
        final Collection<ICompilerProblem> problems = new HashSet<ICompilerProblem>();
       
        // Create an MXMLTreeBuilder to store all the contextual information
        // that we need to build an MXML tree.
View Full Code Here

Examples of org.apache.flex.compiler.mxml.IMXMLData

    protected IFileScopeRequestResult handleFileScopeRequest() throws InterruptedException
    {
        startProfile(Operation.GET_FILESCOPE);
        try
        {
            final IMXMLData mxmlData = getMXMLData();
                   
            final MXMLScopeBuilder scopeBuilder = new MXMLScopeBuilder(this, getFileSpecificationGetter(), mxmlData, qname, getAbsoluteFilename());
            MXMLFileScope fileScope = scopeBuilder.build();
            final ImmutableList<OffsetCue> offsetCueList = scopeBuilder.getIncludeHandler().getOffsetCueList();
            final OffsetLookup offsetLookup = new OffsetLookup(offsetCueList);
View Full Code Here

Examples of org.apache.flex.compiler.mxml.IMXMLData

        // Get the DOM-like MXMLData for the file.
        // If its not already in the Workspace's MXMLDataManager,
        // the MXML file will be parsed.
        final IMXMLDataManager mxmlDataManager = getProject().getWorkspace().getMXMLDataManager();
        final IFileSpecification rootFileSpec = getRootFileSpecification();
        final IMXMLData mxmlData = mxmlDataManager.get(rootFileSpec);
        return mxmlData;
    }
View Full Code Here

Examples of org.apache.flex.compiler.mxml.IMXMLData

            // Resolve the attribute value to a normalized path.
            // Doing so makes this compilation unit dependent on that file.
            String sourcePath = resolveSourceAttributePath(builder, attribute, info);
            if (sourcePath != null)
            {
                IMXMLData mxmlData = builder.getExternalMXMLData(attribute, sourcePath);
                if (mxmlData != null)
                {
                    IMXMLTagData rootTag = mxmlData.getRootTag();

                    rootNode = new MXMLModelRootNode(this);
                    rootNode.initializeFromTag(builder, rootTag);
                }
            }
View Full Code Here

Examples of org.apache.flex.compiler.mxml.IMXMLData

    IFileSpecification fileSpec = new FileSpecification(tempMXMLFile.getPath());
   
    Workspace workspace = new Workspace();
    IMXMLDataManager mxmlDataManager = workspace.getMXMLDataManager();
    IMXMLData mxmlData = mxmlDataManager.get(fileSpec);
    return mxmlData;
  }
View Full Code Here

Examples of org.apache.flex.compiler.mxml.IMXMLData

  {
    String[] code = new String[]
    {
      ""
    };
    IMXMLData mxmlData = getMXMLData(getMXML(code));
    assertThat("mxmlData", mxmlData, is(notNullValue()));
    assertThat("getFileSpecification, getPath", mxmlData.getFileSpecification().getPath(), is(mxmlData.getPath()));
    assertThat("getNumUnits", mxmlData.getNumUnits(), is(0));
    assertThat("getEnd", mxmlData.getEnd(), is(0));
    assertThat("getRootTag", mxmlData.getRootTag(), is(nullValue()));
    assertThat("getMXMLDialect", mxmlData.getMXMLDialect(), is(MXMLDialect.DEFAULT));
    assertThat("getProblems", mxmlData.getProblems().size(), is(0));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.