*
* @return a {@link FXGFileScope} with a class definition for the FXG source
*/
private FXGFileScope createFileScope()
{
FXGFileScope fileScope = new FXGFileScope(this, getAbsoluteFilename());
String packageName = Multiname.getPackageNameForQName(qname);
PackageScope packageScope = new PackageScope(fileScope, packageName);
packageScope.setContainingScope(fileScope);
PackageDefinition packageDefinition = new PackageDefinition(packageName);
packageDefinition.setContainedScope(packageScope);
fileScope.addDefinition(packageDefinition);
Multiname mname = Multiname.crackDottedQName(getProject(), qname);
INamespaceDefinition packageNS = Iterables.getOnlyElement(mname.getNamespaceSet());
ClassDefinition classDefinition = new ClassDefinition(mname.getBaseName(), (INamespaceReference)packageNS);