// store public packages
@Override
    void storeProperties() throws IOException {
        super.storeProperties();
        // Store chnages in manifest
        storeManifestChanges();
        // store localized info
        if (bundleInfo != null && bundleInfo.isModified()) {
            bundleInfo.store();
        } // XXX else ignore for now but we could save into some default location
        ProjectXMLManager pxm = getProjectXMLManager();
        // Store project.xml changes
        // store module dependencies
        DependencyListModel dependencyModel = getDependenciesListModel();
        if (dependencyModel.isChanged()) {
            Set<ModuleDependency> depsToSave = new TreeSet<ModuleDependency>(dependencyModel.getDependencies());
            logNetBeansAPIUsage("DEPENDENCIES", dependencyModel.getDependencies()); // NOI18N
            try {
                pxm.replaceDependencies(depsToSave);
            } catch (CyclicDependencyException ex) {
                throw new IOException(ex);
            }
        }
        Set<String> friends = getFriendListModel().getFriends();
        Set<String> publicPkgs = getPublicPackagesModel().getSelectedPackages();
        boolean refreshModuleList = false;
        if (getPublicPackagesModel().isChanged() || getFriendListModel().isChanged()) {
            if (friends.size() > 0) { // store friends packages
                pxm.replaceFriends(friends, publicPkgs);
            } else { // store public packages
                pxm.replacePublicPackages(publicPkgs);
            }
            refreshModuleList = true;
        }
        // store class-path-extensions + its src & javadoc
        if (cps != null && wrappedJarsListModel != null && wrappedJarsChanged) {
            final List<Item> cpExtList = ClassPathUiSupport.getList(wrappedJarsListModel);
            Map<String, String> newCpExt = new HashMap<String, String>();
            for (Item item : cpExtList) {
                String binPath = item.getFilePath();
                if (binPath != null) {
                    FileObject fo = FileUtil.toFileObject(PropertyUtils.resolveFile(getProjectDirectoryFile(), binPath));
                    if(fo != null)
                    {
                        String runtimePath = ApisupportAntUtils.CPEXT_RUNTIME_RELATIVE_PATH + fo.getNameExt();
                        newCpExt.put(runtimePath, binPath);
                    }
                }
            }
            // delete removed JARs, remove any remaining exported packages and src&javadoc refs left
            Iterator<Item> it = getCPExtIterator();
            HashSet<String> jarsSet = new HashSet<String>(newCpExt.values());
            while (it.hasNext()) {
                Item item = it.next();
                if (!jarsSet.contains(item.getFilePath())) {
                    // XXX deleting here doesn't work on Windows: 
//                    File f = PropertyUtils.resolveFile(getProjectDirectoryFile(), item.getFilePath());
//                    FileObject toDel = FileUtil.toFileObject(f);
//                    if (toDel != null) {
//                        toDel.delete();
//                    }
                    assert item.getReference() != null : "getCPExtIterator() initializes references to wrapped JARs";
                    item.removeSourceAndJavadoc(getUpdateHelper());
                    getRefHelper().destroyReference(item.getReference());
                }
            }
            cps.encodeToStrings(cpExtList, CPEXT);
            pxm.replaceClassPathExtensions(newCpExt);
            wrappedJarsChanged = false;
        }
        if (isStandalone()) {
            ModuleProperties.storePlatform(getHelper(), getActivePlatform());
            if (javaPlatformChanged) {
                ModuleProperties.storeJavaPlatform(getHelper(), getEvaluator(), getActiveJavaPlatform(), false);
            }
            if (refreshModuleList) {
                ModuleList.refreshModuleListForRoot(getProjectDirectoryFile());
            }
        } else if (isSuiteComponent() && refreshModuleList) {
            ModuleList.refreshModuleListForRoot(getSuiteDirectory());
        } else if (isNetBeansOrg()) {
            if (javaPlatformChanged) {
                ModuleProperties.storeJavaPlatform(getHelper(), getEvaluator(), getActiveJavaPlatform(), true);
            }
            if (refreshModuleList) {
                ModuleList.refreshModuleListForRoot(ModuleList.findNetBeansOrg(getProjectDirectoryFile()));
            }
        }
    }
if (friends.size() > 0) { // store friends packages
pxm.replaceFriends(friends, publicPkgs);
} else { // store public packages
pxm.replacePublicPackages(publicPkgs);
}
} catch (CyclicDependencyException ex) {
throw new IOException(ex);
}
}
Set<String> friends = getFriendListModel().getFriends();
Set<String> publicPkgs = getPublicPackagesModel().getSelectedPackages();
boolean refreshModuleList = false;
if (getPublicPackagesModel().isChanged() || getFriendListModel().isChanged()) {
if (friends.size() > 0) { // store friends packages
pxm.replaceFriends(friends, publicPkgs);
} else { // store public packages
pxm.replacePublicPackages(publicPkgs);
}
refreshModuleList = true;
}
// store class-path-extensions + its src & javadoc
if (cps != null && wrappedJarsListModel != null && wrappedJarsChanged) {
final List<Item> cpExtList = ClassPathUiSupport.getList(wrappedJarsListModel);
Map<String, String> newCpExt = new HashMap<String, String>();
for (Item item : cpExtList) {
String binPath = item.getFilePath();
} // XXX else ignore for now but we could save into some default location
ProjectXMLManager pxm = getProjectXMLManager();
// Store project.xml changes
// store module dependencies
DependencyListModel dependencyModel = getDependenciesListModel();
if (dependencyModel.isChanged()) {
Set<ModuleDependency> depsToSave = new TreeSet<ModuleDependency>(dependencyModel.getDependencies());
logNetBeansAPIUsage("DEPENDENCIES", dependencyModel.getDependencies()); // NOI18N
try {
pxm.replaceDependencies(depsToSave);
} catch (CyclicDependencyException ex) {
throw new IOException(ex);
}
}
Set<String> friends = getFriendListModel().getFriends();
Set<String> publicPkgs = getPublicPackagesModel().getSelectedPackages();
boolean refreshModuleList = false;
if (getPublicPackagesModel().isChanged() || getFriendListModel().isChanged()) {
if (friends.size() > 0) { // store friends packages
pxm.replaceFriends(friends, publicPkgs);
} else { // store public packages
pxm.replacePublicPackages(publicPkgs);
}
refreshModuleList = true;
}
// store class-path-extensions + its src & javadoc
if (cps != null && wrappedJarsListModel != null && wrappedJarsChanged) {
final List<Item> cpExtList = ClassPathUiSupport.getList(wrappedJarsListModel);
Map<String, String> newCpExt = new HashMap<String, String>();
for (Item item : cpExtList) {
String binPath = item.getFilePath();
if (binPath != null) {
FileObject fo = FileUtil.toFileObject(PropertyUtils.resolveFile(getProjectDirectoryFile(), binPath));
if(fo != null)
{
String runtimePath = ApisupportAntUtils.CPEXT_RUNTIME_RELATIVE_PATH + fo.getNameExt();
newCpExt.put(runtimePath, binPath);
}
}
}
// delete removed JARs, remove any remaining exported packages and src&javadoc refs left