Bug 574795 - C indexer error on removing C nature from CDT project
Summary: C indexer error on removing C nature from CDT project
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: Next   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-12 04:43 EDT by Anitha S CLA
Modified: 2021-07-12 09:09 EDT (History)
2 users (show)

See Also:


Attachments
C indexer related error when C nature of project is removed (7.54 MB, video/mp4)
2021-07-12 04:43 EDT, Anitha S CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anitha S CLA 2021-07-12 04:43:51 EDT
Created attachment 286766 [details]
C indexer related error when C nature of project is removed

When C nature of a project from the properties are removed, C indexer related errors occurs. This occurs when we try to reimport the project after the removal of C nature from the project and find that all the C related contents are not removed properly upon on removal of nature.

On analysis found that the C indexer is not stopped properly once the C nature is removed.

During closing or deleting of a C configured project, indexer is stopped properly using the stopIndexer method in PDOMManager class and this error doesn’t occurs.

In our use case, we are using createCDTProject API for converting a project to CDT configured Project. In the same way, we have to deconfigure a CDT project. For that we don’t find any API for directly deconfiguring the CDT project so we are trying to remove the C nature programmatically.

When I was trying to remove C nature programmatically, I was facing the above issues. Is there any API for deconfiguring a CDT project?

Attached video for reference.

Thanks in advance.
Comment 1 Jonah Graham CLA 2021-07-12 09:09:55 EDT
Thanks for the bug report. I don't know one way or the other if there is CDT specific API for this. But regardless of CDT API or not, the using of the UI to remove the natures should not cause such an error. There is an error before the project is even deleted from the workspace in the video.

Patches welcome!