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 257576 - Externally modified project metadata breaks IDE behavior in several ways.
Summary: Externally modified project metadata breaks IDE behavior in several ways.
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.2
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-15 08:50 UTC by Alexander Simon
Modified: 2016-02-03 10:21 UTC (History)
0 users

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 Alexander Simon 2016-01-15 08:50:16 UTC
Step to reproduce:
- open project with existing sources.
- open nbproject/configurations.xml in editor.
- make some modification in configurations.xml and save file.
IDE ask (or not ask - it depends on current state of internal metadata representation) to reload metadata. Confirm reload.
Observed misbehavior:
- Code model has two native file item for each C/C++/Header file in the project. It can led to wrong code model.
- Select file in project view is not working.
Comment 1 Alexander Simon 2016-01-15 08:53:00 UTC
Proposed partial fix for two native file items:

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/MakeConfigurationDescriptor.java
+++ b/MakeConfigurationDescriptor.java
@@ -257,6 +257,9 @@
                 }
             }
         }
+        for (Entry<String, Item> entry : projectItems.entrySet()) {
+            entry.getValue().onClose();
+        }
         projectItems.clear();
         synchronized (sourceRoots) {
             sourceRoots.clear();
Comment 2 Vladimir Voskresensky 2016-01-15 18:46:32 UTC
used only safe fix for 8.1
990680e11a99 [release81] 
64292c3a863b [release81]
Comment 3 Quality Engineering 2016-01-18 03:04:11 UTC
Integrated into 'main-silver', will be available in build *201601180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/097fc7254e0a
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #257576 - Externally modified project metadata breaks IDE behavior in several ways
- this is safe fix to solve mentioned issue. But some problems remains, i.e. root folder sometimes doesn't update it's children on reload
(transplanted from 990680e11a995fd7c32591c43b9d9932ed5d24d4)
Comment 5 soldatov 2016-02-03 10:21:27 UTC
Verified in NetBeans 8.1 patch1