"http://ns.adobe.com/mxml/2009", env.SDK
+ "\\frameworks\\mxml-2009-manifest.xml");
namespaceMappings.add(mxml2009);
project.setNamespaceMappings(namespaceMappings);
ICompilationUnit cu = null;
String normalizedMainFileName = FilenameNormalization
.normalize(tempASFile.getAbsolutePath());
SourceCompilationUnitFactory compilationUnitFactory = project
.getSourceCompilationUnitFactory();
File normalizedMainFile = new File(normalizedMainFileName);
if (compilationUnitFactory.canCreateCompilationUnit(normalizedMainFile))
{
Collection<ICompilationUnit> mainFileCompilationUnits = workspace
.getCompilationUnits(normalizedMainFileName, project);
for (ICompilationUnit cu2 : mainFileCompilationUnits)
{
if (cu2 != null)
cu = cu2;
}
}
// Build the AST.
IFileNode fileNode = null;
try
{
fileNode = (IFileNode) cu.getSyntaxTreeRequest().get().getAST();
}
catch (InterruptedException e)
{
e.printStackTrace();
}