private void resolvePeerGenSettings(ProjectClass projectclass, ProjectSettingsAdapter settings) {
        PeerGenSettings peergenset = settings.getPeerGenSettings();

        if (settings.getDoPeerGen() == true) {
            if (peergenset == null) {
                //build a new one
                peergenset = new PeerGenSettings(_project);
                peergenset.addClassName(projectclass.getClassName());
                settings.setPeerGenSettingsPushTo(peergenset);
                _project.addPeerGenSettings(peergenset);
            } else {
                if (settings.getPeerIsDirty()) {
                    //test for more than one,
                    //iterator doesn't lend itself to this.
                    Iterator i = peergenset.getClassNames();
                    String s;
                    int count = 0;
                    while (i.hasNext()) {
                        s = (String) i.next();
                        count++;
                    }

                    if (count > 1) {
                        PeerGenSettings newPeergenset = new PeerGenSettings(_project);
                        newPeergenset.addClassName(projectclass.getClassName());
                        settings.setPeerGenSettingsPushTo(newPeergenset);
                        peergenset.removeClassName(projectclass.getClassName());
                    }
                }
            }
        } else {
            if (peergenset != null) {
                peergenset.removeClassName(projectclass.getClassName());
                if (peergenset.getClassNames().hasNext() == false) {
                    //it's empty, let's remove it.
                    _project.removePeerGenSettings(peergenset);
                }
            }
        }
    }