Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Proposed work-around patch for bug 242955

I have posted a work-around patch in bug 242955 involving problems with the Manage Configurations dialog after closing and restarting Eclipse. I had created a new configuration via Manage Configurations which was initially copied from the default. I gave it a unique name and made multiple settings changes. When Eclipse gets restarted, the Manage Configurations dialog shows multiple copies of the default configuration and the one I created is missing. Renaming any of the extraneous default configurations doesn't work because all the settings are default settings. This forces me to recreate the desired configuration from scratch which is very annoying. Apparently, reproducing the problem involves using the Apply button, then also using the Ok button which I happened to do.

Looking at the .cproject file created, there is a problem because there are two cconfiguration elements with the same id. The first is my modified active configuration and the 2nd is the default configuration with default settings. The method createCfgStorages in CProjectDescriptionManager uses a LinkedHashMap where it adds elements by id. The 2nd cconfiguration causes it to overwrite the first and so we never see the new one again.

My work-around patches CProjectDescriptionManager.createCfgStorages so when it is creating its map, it does not replace an existing configuration it has already added with a particular id. This solves the problem found in the .cproject file, but it does not address why the 2nd cconfiguration element is there in the first-place so I am posting this as a work-around patch.

-- Jeff J.


Back to the top