private CSSCompilationSession cssCompilationSession;
void initialize(MXMLTreeBuilder builder)
{
IFileSpecification fileSpec = builder.getFileSpecification();
project = builder.getProject();
qname = builder.getQName();
fileScope = builder.getFileScope();
// When parsing the MXML for AST construction, ad-hoc IncludeHandler are created in
// order to please the MXML lexer and to keep the AST node offsets in-sync with
// the scope tree node offsets. As a result, the MXML AST nodes does not have a
// usable OffsetLookup after tree building. That's why we need to provide the real
// OffsetLookup from the scope building.
final OffsetLookup offsetLookup = fileScope.getOffsetLookup();
assert offsetLookup != null : "Expected offset lookup on MXMLFileScope.";
this.offsetLookup = offsetLookup;
setLocation(builder);
// Add implicit import nodes for ActionScript.
for (String importStr : ASFileScope.getImplicitImportsForAS())
{
ImportNode implicitImportNode = new MXMLImplicitImportNode(project, importStr);
addImportNode(implicitImportNode);
}
// Add implicit import nodes for MXML.
for (IImportNode implicitImportNode : project.getImplicitImportNodesForMXML(builder.getMXMLDialect()))
{
addImportNode(implicitImportNode);
}
includeTreeLastModified = fileSpec.getLastModified();
processUnits(builder);
}