Examples of MXMLCompilationUnit


Examples of org.apache.flex.compiler.internal.units.MXMLCompilationUnit

    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.";
View Full Code Here

Examples of org.apache.flex.compiler.internal.units.MXMLCompilationUnit

        // MXML files on the source path have a non-null qname,
        // but those in the source list have a null qname.
        if (qname == null)
            qname = FilenameUtils.getBaseName(path);
               
        return new MXMLCompilationUnit(project, path, basePriority, order, qname);
    }
View Full Code Here

Examples of org.apache.flex.compiler.internal.units.MXMLCompilationUnit

           
            // Only validate root MXML compilation unit because only an application file can have type selectors.
            ICompilationUnit rootCompilationUnit = getRootClassCompilationUnit();
            if (rootCompilationUnit.getCompilationUnitType() != ICompilationUnit.UnitType.MXML_UNIT)
                return;
            final MXMLCompilationUnit rootMXMLCompilationUnit = (MXMLCompilationUnit)rootCompilationUnit;
               
            // Only validate root MXML compilation unit because only an application file can have type selectors.
            final MXMLFileNode mxmlFileNode = (MXMLFileNode)rootMXMLCompilationUnit.getSyntaxTreeRequest().get().getAST();
            CSSSemanticAnalyzer.validate(
                    builtCompilationUnits,
                    mxmlFileNode.getCSSCompilationSession(),
                    problems);
        }
View Full Code Here

Examples of org.apache.flex.compiler.internal.units.MXMLCompilationUnit

    @Override
    public ICompilationUnit createCompilationUnit(CompilerProject proj,
            String path, DefinitionPriority.BasePriority basePriority,
            int order, String qname, String locale)
    {
        return new MXMLCompilationUnit(proj, path, basePriority, order, qname);
    }
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.