/**
* Updates the old features setting and returns a map of new features.
*/
private Map createNewBundleGroupsMap() {
// retrieve list of installed bundle groups from last session
IDialogSettings settings = IDEWorkbenchPlugin.getDefault()
.getDialogSettings();
String[] previousFeaturesArray = settings.getArray(INSTALLED_FEATURES);
// get a map of currently installed bundle groups and store it for next
// session
Map bundleGroups = computeBundleGroupMap();
String[] currentFeaturesArray = new String[bundleGroups.size()];
bundleGroups.keySet().toArray(currentFeaturesArray);
settings.put(INSTALLED_FEATURES, currentFeaturesArray);
// remove the previously known from the current set
if (previousFeaturesArray != null) {
for (int i = 0; i < previousFeaturesArray.length; ++i) {
bundleGroups.remove(previousFeaturesArray[i]);