This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 229274 - C/C++ project is not saved when adding or removing files
Summary: C/C++ project is not saved when adding or removing files
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.3
Hardware: PC All
: P3 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-02 11:42 UTC by Elusive
Modified: 2014-01-28 10:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elusive 2013-05-02 11:42:05 UTC
"nbproject/configurations.xml" is not updated if files (or logical folders) in the project change (added/moved/removed). This is obviously bad for version control, as the project state in NetBeans differs from the one tracked by the VCS. The current workaround is to close the project, which seems to force the project to be written to the disk but slows down development a lot.

Steps to Reproduce:
1. Create a "C/C++ Application" project.
2. Create a "C++ Class".

Actual Results:
"nbproject/configurations.xml" does not contain the new class.

Expected behavior:
The project is written to disk when modified.

Build Date & Platform:
NetBeans IDE 7.3 (Build 201302132200) on Linux version 3.2.0-40-generic running on amd64
NetBeans IDE Build 201304292301 on Linux version 3.2.0-40-generic running on amd64
Comment 1 Maria Tishkova 2013-06-25 11:57:37 UTC
When new file/files are added the project configuration.xml should be saved on disk
Comment 2 Maria Tishkova 2013-06-26 11:58:21 UTC
fixed in http://hg.netbeans.org/cnd-main/rev/e7dbfc9198fd

Actions covered:
New,
Add Existing Item
Add Existing Items From Folder
Remove From Project
Delete
Rename

For all actions listed above we will invoke save for MakeConfigurationDescriptor.
It would be better if we introduce batch update for MakeConfigurationDescriptor and invoke save for all project changes
Comment 3 Quality Engineering 2013-06-27 02:19:38 UTC
Integrated into 'main-golden', will be available in build *201306262301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e7dbfc9198fd
User: Maria Tishkova <mromashova@netbeans.org>
Log: fixed bz#229274 - C/C++ project is not saved when adding or removing files
Actions covered:
New,
Add Existing Item
Add Existing Items From Folder
Remove From Project
Delete
Rename

For all actions listed above we will invoke save for MakeConfigurationDescriptor.
It would be better if we introduce batch update for MakeConfigurationDescriptor and invoke save for all project changes
Comment 4 Alexander Simon 2013-09-24 09:06:44 UTC
Configuration is saved in unpredictable state.
(See Bug 235743 - A deleted file appears in Projects tab)
Problem in race:
- saving thread in MakeConfigurationDescriptor->save()
- modification thread in NodeActionFactory->ViewItemNode->destroy() and rename()
Comment 5 Alexander Simon 2013-09-24 11:40:28 UTC
(In reply to Alexander Simon from comment #4)
> Configuration is saved in unpredictable state.
> (See Bug 235743 - A deleted file appears in Projects tab)
> Problem in race:
> - saving thread in MakeConfigurationDescriptor->save()
> - modification thread in NodeActionFactory->ViewItemNode->destroy() and
> rename()

fixed in change set:
5ae5ad126daf
Comment 6 Maria Tishkova 2013-09-24 12:44:55 UTC
reviewed, fix is save and correct
Comment 7 Quality Engineering 2013-09-26 00:00:19 UTC
Integrated into 'releases/release74', will be available in build *201309252201* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/bbe6d98fa7bf
User: Alexander Simon <alexvsimon@netbeans.org>
Log: additional fix for Bug #229274 C/C++ project is not saved when adding or removing files
(transplanted from 5ae5ad126daf99da5b102ddf9d2a1f3c533ce58f)