Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356982 - CDT forgets language mappings after the restart
Summary: CDT forgets language mappings after the restart
Status: VERIFIED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 8.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 8.0.2   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
: 364616 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-07 13:49 EDT by Eugene Ostroukhov CLA
Modified: 2013-05-24 15:29 EDT (History)
3 users (show)

See Also:


Attachments
Suggested fix. (1.25 KB, text/plain)
2011-09-07 13:49 EDT, Eugene Ostroukhov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Ostroukhov CLA 2011-09-07 13:49:22 EDT
Created attachment 202922 [details]
Suggested fix.

To reproduce:
1. Customize mappings on the "Language Mapping" preference page (i.e. map C++ header to Assembly)
2. Save changes. Reopen preference page to verify that the settings are remembered.
3. Restart the IDE and verify that table on the preference page is empty.

This problem is caused by LanguageMappingStore::decodeWorkspaceMappings checking default store first and comparing the value returned with null. Default value of this preference is not null but zero-length string (CCorePreferenceInitializer:49)

Suggested fix:
Check non-default value first (it will be null if unset)
Comment 1 Anton Leherbauer CLA 2011-09-08 05:22:18 EDT
Good catch. Thanks for the patch.
Comment 2 Anton Leherbauer CLA 2011-09-19 05:12:46 EDT
Patch committed and pushed to master and cdt_8_0.  Thanks again!
Comment 3 CDT Genie CLA 2011-09-19 05:23:04 EDT
*** cdt git genie on behalf of Eugene Ostroukhov ***

    Bug 356982 - CDT forgets language mappings after the restart

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=0fd03f628b500d541ea69545569068b57a05821b
Comment 4 CDT Genie CLA 2011-09-19 05:23:08 EDT
*** cdt git genie on behalf of Eugene Ostroukhov ***

    Bug 356982 - CDT forgets language mappings after the restart

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=7c0fb4da1f1da06353cfa9512fbef19334a4ccde
Comment 5 Marc-André Laperle CLA 2011-11-23 19:39:04 EST
*** Bug 364616 has been marked as a duplicate of this bug. ***
Comment 6 Marc-André Laperle CLA 2012-01-22 12:03:05 EST
Verified in 8.0.2 RC1.