}
if ( ! packageData.isLeaf() ) {
// System.err.println("setParentDefaultModuleSettings: " + packageData.getName());
int state = packageData.getSelectionState();
InstallData installdata = InstallData.getInstance();
boolean allChildrenIgnored = true;
boolean atLeastOneInstalled = false;
boolean allChildrenHidden = true;
// System.err.println(" STATE before iterating over children: " + state);
for (Enumeration e = packageData.children(); e.hasMoreElements();) {
PackageDescription child = (PackageDescription) e.nextElement();
int childState = child.getSelectionState();
// System.err.println(" Child: " + child.getName() + " : " + childState);
if ( childState != PackageDescription.IGNORE) {
allChildrenIgnored = false;
}
if (( childState == PackageDescription.INSTALL) || ( childState == PackageDescription.INSTALL_SOME)) {
atLeastOneInstalled = true;
}
if ( ! child.isHidden() ) {
allChildrenHidden = false;
}
if ((state == PackageDescription.DONT_KNOW) || (state == PackageDescription.IGNORE)) {
state = childState;
// } else if ((state != childState) && (childState != PackageDescription.IGNORE)) {
} else if ((state != childState) && (childState != PackageDescription.IGNORE) && (childState != PackageDescription.DONT_KNOW)) {
if ( installdata.isUninstallationMode() ) {
state = PackageDescription.REMOVE_SOME;
} else {
state = PackageDescription.INSTALL_SOME;
}
}
// System.err.println(" NEW state after child: " + state);
}
if ( allChildrenIgnored ) {
state = PackageDescription.IGNORE;
}
if ( installdata.isInstallationMode() ) {
if (( state == PackageDescription.INSTALL_SOME ) && ( ! atLeastOneInstalled )) {
state = PackageDescription.DONT_INSTALL;
}
}