{
List<IDefinition> definitions = getDefinitionPromises();
ASFileScope fileScope = new ASFileScope(fileNode);
String packageName = Multiname.getPackageNameForQName(definitions.get(0).getQualifiedName());
PackageScope packageScope = new PackageScope(fileScope, packageName);
packageScope.setContainingScope(fileScope);
PackageDefinition packageDefinition = new PackageDefinition(packageName);
packageDefinition.setContainedScope(packageScope);
fileScope.addDefinition(packageDefinition);
for(IDefinition def : definitions)
{
Multiname mname = Multiname.crackDottedQName(getProject(), def.getQualifiedName());
INamespaceDefinition packageNS = Iterables.getOnlyElement(mname.getNamespaceSet());
ClassDefinition classDefinition = new ClassDefinition(mname.getBaseName(), (INamespaceReference)packageNS);
IReference baseClass = ReferenceFactory.packageQualifiedReference(getProject().getWorkspace(), getFlexProject().getResourceBundleClass());
classDefinition.setBaseClassReference(baseClass);
classDefinition.setExcludedClass();
TypeScope classScope = new TypeScope(packageScope, classDefinition);
classScope.setContainingDefinition(classDefinition);
classDefinition.setContainedScope(classScope);
classDefinition.setupThisAndSuper();
packageScope.addDefinition(classDefinition);
}
return fileScope;
}