private void resolveProxyGenSettings(ProjectClass projectclass, ProjectSettingsAdapter settings) {
        ProxyGenSettings proxygenset = settings.getProxyGenSettings();

        if (settings.getDoProxyGen() == true) {
            if (proxygenset == null) {
                //build a new one
                proxygenset = new ProxyGenSettings(_project);
                proxygenset.addClassName(projectclass.getClassName());
                settings.setProxyGenSettingsPushTo(proxygenset);
                _project.addProxyGenSettings(proxygenset);
            } else {
                if (settings.getProxyIsDirty()) {
                    //test for more than one,
                    //iterator doesn't lend itself to this.
                    Iterator i = proxygenset.getClassNames();
                    String s;
                    int count = 0;
                    while (i.hasNext()) {
                        s = (String) i.next();
                        count++;
                    }

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