if (project instanceof FlexJSProject)
((FlexJSProject) project).mainCU = mainCU;
Configurator projectConfigurator = backend.createConfigurator();
JSTarget target = (JSTarget) backend.createTarget(project,
projectConfigurator.getTargetSettings(null), null);
target.build(mainCU, new ArrayList<ICompilerProblem>());
List<ICompilationUnit> reachableCompilationUnits = project
.getReachableCompilationUnitsInSWFOrder(ImmutableSet.of(mainCU));
for (final ICompilationUnit cu : reachableCompilationUnits)
{