1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-30 12:25:35 +02:00

Add a comment to help explain one of the mysteries of SetCProjectDescriptionOperation

I'm not sure how sufficient this explanation is but it's better than
leaving just "// Why?" for that central piece of code in CDT.

Change-Id: I0858f83b8f4fbe65fd869e96fb210b5af7d16f65
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
This commit is contained in:
Marc-Andre Laperle 2020-10-01 21:47:02 -04:00 committed by Marc-André Laperle
parent 7a938095be
commit 90a8376658

View file

@ -133,6 +133,13 @@ public class SetCProjectDescriptionOperation extends CModelOperation {
fSetDescription, delta);
cProject.close(); // Why?
// M-A.L: Here is an explanation I came up with from an investigation I did a long time ago (https://bugs.eclipse.org/bugs/show_bug.cgi?id=349564#c10) :
// "Some information in the CModel cache depends on the CProjectDescription. For example,
// CContainerInfo caches the non-C resources (like excluded files). By closing the CProject,
// that cache is deleted and rebuilt from CProjectDescription when needed. As a test,
// I removed this line and excluded some files then I could see the cache not
// being rebuilt and the icons for exclusion became out of sync."
// If you are tempted to remove this line please consider this.
// ExternalSettingsManager.getInstance().updateDepentents(delta);