Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349481 - Modifying a project silently fails when .cproject is read-only
Summary: Modifying a project silently fails when .cproject is read-only
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-15 13:50 EDT by Baltasar Belyavsky CLA
Modified: 2020-09-04 15:22 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Baltasar Belyavsky CLA 2011-06-15 13:50:01 EDT
Build Identifier: I20110428-0848 [Indigo M7]

When the .cproject file is read-only, making changes to the project only takes effect in the object-model, but not persisted into the .cproject file.  This, in itself, probably isn't bad, but the problem is that the user isn't notified of this in any way, so the user believes the changes were saved.  Then, closing and reopening the project (or reimporting it) causes all in-memory changes to be reverted.

If source-control is integrated, attempts to save the .cproject file should probably cause the file to be checked out.  But if no source-control integration is present, and the .cproject file is read-only, then some kind of a visual notification has to be shown to the user.  The .project file causes an error message to be popped up in this case.

Reproducible: Always

Steps to Reproduce:
1. Create any simple project.
2. Set both the .project and the .cproject files to be read-only.
3. Add a CDT project-dependency using the C/C++ General > Paths and Symbols > References tab.
-> The change appears to take effect, but it's only in-memory - closing/reopening the project reverts to original state.
4. Now add a project reference using the Platform UI (Project References page).
-> An error is popped up saying that the .project file is read-only, and the change does take effect in-memory.
Comment 1 Andrew Gvozdev CLA 2011-06-15 17:05:11 EDT
Not sure how useful now but bug 80075 got a patch for .cdtbuild file.