assert offsetLookup != null : "Expected OffsetLookup on FileScope.";
final String filePath = getContainingFilePath();
final int[] absoluteOffsets =
offsetLookup.getAbsoluteOffset(filePath, startOffsetLocal);
final int startOffsetAbsolute = absoluteOffsets[0];
final IncludeHandler includeHandler =
IncludeHandler.createForASTBuilding(builder.getFileSpecificationGetter(), filePath, startOffsetLocal, startOffsetAbsolute);
includeHandler.setProjectAndCompilationUnit(project, builder.getCompilationUnit());
final String scriptFragment = attribute.getRawValue();
if (scriptFragment.isEmpty())
{
MXMLEmptyEventHandlerProblem problem = new MXMLEmptyEventHandlerProblem(attribute);
problems.add(problem);
}
final ScopedBlockNode node = ASParser.parseFragment2(
scriptFragment,
filePath,
0,
attribute.getValueLine(),
attribute.getValueColumn(),
problems,
workspace,
builder.getFileNode(),
scope,
project.getProjectConfigVariables(),
EnumSet.of(PostProcessStep.CALCULATE_OFFSETS, PostProcessStep.POPULATE_SCOPE),
true, //follow includes
includeHandler);
builder.getFileNode().updateIncludeTreeLastModified(includeHandler.getLastModified());
processHandlerCode(builder, Collections.singletonList(node));
}