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.";