Object[] selection = initialObjectCreationPage.packageField.getSelection();
if (selection != null && selection.length > 0) {
JavaPack pack = (JavaPack)JexPackage.eINSTANCE.getEFactoryInstance().create(JexPackage.eINSTANCE.getJavaPack());
pack.setName(((IJavaElement)selection[0]).getElementName());
((AbstractRequirement)rootObject).getJavaElements().add(pack);
Command createChildrenCommand = null;
if (initialObjectCreationPage.immediateChildrenButton.getSelection()) {
createChildrenCommand = new CreateChildrenFromJavaModelCommand(pack, Flags.AccPublic, false);
} else if (initialObjectCreationPage.recursiveChildrenButton.getSelection()) {
createChildrenCommand = new CreateChildrenFromJavaModelCommand(pack, Flags.AccPublic, true);
}
if (createChildrenCommand != null && createChildrenCommand.canExecute()) {
createChildrenCommand.execute();
}
}
// Save the contents of the resource to the file system.
//
Map options = new HashMap();